How to convert loop code to loopless
显示 更早的评论
for i=0:pi/180:2*pi
x=round(row+radius*cos(i));
y=round(col+radius*sin(i));
if(x>0 && y>0 && x<m && y<n)
A(x,y)=1;
end
end
1 个评论
Stephen23
2015-11-17
What are the size and class of row, radius, col, m, n, and A?
In order to be able to run your code you need to post a complete working example, not just the part that you think is interesting.
回答(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!