Error using patch - Non-numeric data is not supported in 'patch'. While using Plotcube
4 次查看(过去 30 天)
显示 更早的评论
I'm trying to plot a cube using plotcube
plotcube([width length height],[ 0 0 0 ],1,[1 0 0]);
This is the Error I'm getting
Error using patch
Non-numeric data is not supported in 'patch'
Error in plotcube (line 49)
cellfun(@patch,XYZ{1},XYZ{2},XYZ{3},...
Error in MATLAB (line 31)
plotcube([width length height],[ 0 0 0 ],1,[1 0 0]);
Can anyone help?
Thank You
1 个评论
Walter Roberson
2019-11-28
What are class() of length and width and height at that point in the code?
回答(1 个)
KSSV
2019-11-28
width = 1 ;
length = 1 ;
height = 1 ;
plotcube([width length height],[ 0 0 0 ],1,[1 0 0]);
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Lighting, Transparency, and Shading 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!