필터 지우기
필터 지우기

How can I divide square area to sub areas?

조회 수: 2 (최근 30일)
sara alaraby
sara alaraby 2019년 2월 26일
답변: Image Analyst 2019년 3월 14일
I have square area 100*100
I need to divide it to 3 sub areas.
I tried to write this code but there is an error:
R1=[];
R2=[];
R3=[];
for i=0:1:15
i (0<BSy(i)<=200/3)
%%region 1 from 0:200/3
R1=[R1 i];
elseif (200/3<BSy(i)<=200*2/3)
%%region 2 from 200/3:2*200/3
R2=[R2 i];
R3=[R3 i];
end
end

채택된 답변

Image Analyst
Image Analyst 2019년 3월 14일
Use "if" instead of "i" and change the logical test. This:
i (0<BSy(i)<=200/3)
should be this:
if (0 < BSy(i)) && (BSy(i) <= 200 / 3)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Prepare and Analyze Model에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by