Array row is not added in for loop
显示 更早的评论
I'm trying to add a new row whenever L*W*H = 50, but when I run it the array dimensiones does not change. What's going on...?
syms L W H;
dimensiones = [0, 0, 0];
for W = 1:100
L = W*3;
for H = 1:100
if L*W*H==50
dimensiones = [dimensiones; L, W, H];
end
end
end
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Mathematics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!