hi everyone , can anyone help me to make it , thank you

1 次查看(过去 30 天)
clear all
clc
X=[ 10 17 20 ; 1 4 8 ; 2 3 30 ]
Z=zeros(3,3)
% i need to put in the matrix Z this condition
% 1) if greatar than or equal 15 is 1
% 2)and if less than 15 is zero
%thank you

采纳的回答

madhan ravi
madhan ravi 2019-4-11
I suggest you to read about logical indexing:
~(X<15)
  1 个评论
mina massoud
mina massoud 2019-4-11
i read about it but can u help me to get be the same dimensione of A instead of column vector
A=magic(4);
B=zeros(4,4); % i need a matrix in this dimension with that condition
B=A(A<5|A>10);

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Calendar 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by