Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How to give range of value to a single variable

조회 수: 1 (최근 30일)
Athul C P
Athul C P 2018년 6월 28일
댓글: Jan 2018년 6월 28일
I need to create a series given below rt = 0<x<=1 ,1<x<=4 , 4<x<=7 , 7<x<=10
After this, check one condition for each element of rt with two matrices using if loops
I will explain that single value problem,
for rt=1:1:10
h=0;f=0;m=0;c=0;
for s=1:z
if ob(s)==rt && da3(s)==rt
h=h+1;
elseif ob(s)~=rt && da3(s)==rt
f=f+1;
elseif ob(s)==rt && da3(s)~=rt
m=m+1;
elseif ob(s)~=rt && da3(s)~=rt
c=c+1;
end
end
end
  댓글 수: 3
Guillaume
Guillaume 2018년 6월 28일
I don't see any marked difference between this question and the previous two times you asked it:
In none of these questions have you clearly explained what you want. So please, go and edit either of these questions. And provide a lot more details, such as an example of input and desired output.
Jan
Jan 2018년 6월 28일
There are not "if loops" in Matlab.

답변 (0개)

이 질문은 마감되었습니다.

태그

제품


릴리스

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by