Getting an error after rounding data.
信息
此问题已关闭。 请重新打开它进行编辑或回答。
显示 更早的评论
I get an error saying 'Index exceeds matrix dimensions.' when I try to plot data rounded to 3 decimal places. It works fine without rounding.
filtered_hand = sprintf('%6.3f',filtered_hand)
plot3(handles.axes4, filtered_hand(index(j),1), filtered_hand(index(j),2), filtered_hand(index(j),3), 'o')
1 个评论
回答(1 个)
Azzi Abdelmalek
2013-4-21
编辑:Azzi Abdelmalek
2013-4-21
After
filtered_hand = sprintf('%6.3f',filtered_hand)
filtered_hand becomes a string
If you want to round to 3 decimals use
filtered_hand = round(filtered_hand*1000)/1000
0 个评论
此问题已关闭。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!