Data dimensions must agree
조회 수: 16 (최근 30일)
이전 댓글 표시
i have a function z which has two variables x and y. z , x and y are vectors of length 20. While plotting a function, MATLAB says that 'Data dimensions must agree'. Using the commands
x=PitchAngle;
y=TipSpeedRatio;
[xx,yy]=meshgrid(x,y);
zz=PowerCoefficient;
z=reshape(zz,[5,4])
mesh(x,y,z)
I dont know whether i am using the right command. Please lead me to the right way. Thankyou
채택된 답변
madhan ravi
2020년 7월 18일
편집: madhan ravi
2020년 7월 18일
x = reshape(x, 1, []);
y = reshape(y, 1, []);
[xx, yy]=meshgrid(x,y);
z = repmat(zz(:), 1, size(xx, 2));
mesh(xx, yy, z)
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!