surfnorm function shows error
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Sara
am 15 Nov. 2020
Kommentiert: Ameer Hamza
am 15 Nov. 2020
Hi,
I am trying to use surfnorm function to calculate the nor of 3D meshgrid. But the use of the functions shows error "Y and Z must be the same size as X." which I do not understand why!!
The size of X,Y,Z are the same even though the document in mathwork says it is possible to use meshgrid as an input as attached in the questions
x = linspace(-1,1,10);
y = x;
z = x;
[X,Y,Z]=meshgrid(x,y,z);
figure,
surfnorm(X,Y,Z);
0 Kommentare
Akzeptierte Antwort
Ameer Hamza
am 15 Nov. 2020
Bearbeitet: Ameer Hamza
am 15 Nov. 2020
X, Y, and Z must be 2D matrices. Z is a function of X and Y in this case. The following shows an example of how to use it properly
x = linspace(-1,1,10);
y = x;
[X,Y]=meshgrid(x,y);
Z = X+Y; % Z=X+Y is chosen as an example to show Z is a function of X and Y
figure,
surfnorm(X,Y,Z);
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Antennas, Microphones, and Sonar Transducers finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!