A basic question about the counter
信息
此问题已关闭。 请重新打开它进行编辑或回答。
显示 更早的评论
Hello, here I have some part of my code. The thing is I want to count the code after 'else'. I can put counter, yes but It counts the total usage of that line. I want to see how many times it is being used in each row of the matris 'vertices'. I mean seperately for each row.
for M=1:m %color
for d=1:D
if abs(left_side(M,1)-vertices(d,1))<0.3 && abs(left_side(M,2)-vertices(d,2))<0.2
if vertices(d,4)==0;
vertices(d,4)=left_side(M,4);
else vertices(d,4)=(vertices(d,4)+left_side(M,4));
end
end
end
end
0 个评论
回答(1 个)
此问题已关闭。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!