Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
how to make status array (like status=010) instead of status variable which holding one value
조회 수: 2 (최근 30일)
이전 댓글 표시
how to make status array (like status=010) instead of status variable which holding one value
댓글 수: 0
답변 (1개)
Salaheddin Hosseinzadeh
2014년 3월 12일
if true
% code
endMake a array as such
status(1:3)=[0 1 0]
then you can call status(1) and it will show you 0 I'm not sure if your problem was so easy to be solved! I probably don't understand your question!
댓글 수: 2
Salaheddin Hosseinzadeh
2014년 3월 12일
편집: Salaheddin Hosseinzadeh
2014년 3월 12일
Ok! Try this then
status=[]; %predefining an epmty status
for i = 1 : n1
for j = 1 : m1
for k =1 : 4
if(B{i,j}== 0)
status=[status,0];
else
status=[status,1];
end
end
end
end
Hope this helps!
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!