显示 更早的评论
if b>a & b>c
disp(b)
elseif c>a & c>b
disp(c)
else disp(a)
disp(a)
end
I have defined:
>> a
a =
24
>> b
b =
42
>> c
c =
64
when I run this the if/else works and i get 64
but it does not disp a afterwards. Why not?
1 个评论
Jan
2011-10-31
You can copy the lines to a function and use the debugger to step through the code line by line. This is usually more helpful for learning than letting Walter find the problem.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Argument Definitions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!