why doesnt it works
显示 更早的评论
for i = 1 :1: N
for j = 1 :1: N
if u(i,j) < 1-a(i,j) && N<1- (u(i,j)/(1-a(i,j)))
z= (1-a(i,j))*N
end
end
end
4 个评论
Peter Perkins
2020-11-19
Also, you don't need loops at all.
z = zeros(size(a));
i = (u < 1-a) && (N < 1 - u./(1-a))
z(i) = (1-a(i)) .* N;
Nirajan Khatri
2020-11-20
Nirajan Khatri
2020-11-20
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!