Info
此问题已关闭。 请重新打开它进行编辑或回答。
How to ask the user to check avalue from a loop
1 次查看(过去 30 天)
显示 更早的评论
I have this loop
For i= 1:30
s=a*x(i);
if s>=0
cc(i)=1;
else cc(i)=0;
end
end
I want the user to select a number between 1:30 and check if it is equal to 1 or 0 and state that for 0 it is normal and for 1 it is not
2 个评论
Guillaume
2018-3-16
I want ...
While I understand what you ask I completely fail to see how it relates to your loop. What is the link?
回答(1 个)
David Fletcher
2018-3-16
编辑:David Fletcher
2018-3-16
I'm not entirely sure I understand what you are trying to do, but if you just want to get basic input from the user then see the docs on the input function.
0 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!