MATLAB Answers

Error using patch - Non-numeric data is not supported in 'patch'. While using Plotcube

조회 수: 4(최근 30일)
Hamza Khalid
Hamza Khalid 28 Nov 2019
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
Walter Roberson 28 Nov 2019
What are class() of length and width and height at that point in the code?

로그인 to comment.

답변 수 (1)

KSSV
KSSV 28 Nov 2019
width = 1 ;
length = 1 ;
height = 1 ;
plotcube([width length height],[ 0 0 0 ],1,[1 0 0]);

  댓글 수: 0

로그인 to comment.

이 질문에 답변하려면 로그인을(를) 수행하십시오.

태그

제품


Translated by