Getting - Matrix dimensions must agree, using surf

1 vue (au cours des 30 derniers jours)
William Blanch
William Blanch le 25 Mai 2022
Commenté : Walter Roberson le 26 Mai 2022
>> 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)

Réponses (1)

Walter Roberson
Walter Roberson le 25 Mai 2022
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 commentaires
William Blanch
William Blanch le 26 Mai 2022
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 le 26 Mai 2022
https://www.mathworks.com/matlabcentral/fileexchange?q=patch2stl

Connectez-vous pour commenter.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by