Getting - Matrix dimensions must agree, using surf

조회 수: 3 (최근 30일)
William Blanch
William Blanch 2022년 5월 25일
댓글: Walter Roberson 2022년 5월 26일
>> Paving
??? Error using ==> surface
Matrix dimensions must agree.
Error in ==> C:\MATLAB6p1\toolbox\matlab\graph3d\surf.m
On line 68 ==> hh = surface(varargin{:});
Error in ==> D:\Matlab\MATLAB6p1\work\Paving.m
On line 38 ==> surf(X,Y,Z)

답변 (1개)

Walter Roberson
Walter Roberson 2022년 5월 25일
When you call surf(X, Y, Z) in your very old release, the number rows in Z must match the number of rows in Y and the number of columns in Z must match the number of columns in X. However in your code, X, Y, Z are all vectors.
surf() can never be used to turn a set of scattered points into a surface.
  댓글 수: 7
William Blanch
William Blanch 2022년 5월 26일
Thank You, but what I need is an .stl file so that I can create a part of it in Solidworks. Can you get an .stl file from a patch?
Walter Roberson
Walter Roberson 2022년 5월 26일
https://www.mathworks.com/matlabcentral/fileexchange?q=patch2stl

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 STL (STereoLithography)에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by