3D surface plot from imported 2D excel array
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
joe pearson
am 2 Mär. 2018
Bearbeitet: joe pearson
am 3 Mär. 2018
New to Matlab. Im sure this is answered somewhere already, but I can't manage to find it; I have a 2D array of experimental data tabulated in excel. 1st row and column are varied parameters, and I measure the corresponding amplitudes in the matrix. Importing the table to Matlab is simple. I would then like to plot a 3D surface of the 1st row (x) vs. 1st column (y), for the amplitudes in the matrix. This is very straightforward in excel, but the plots look terrible. Thanks in advance for the help.
0 Kommentare
Akzeptierte Antwort
Star Strider
am 2 Mär. 2018
Try this:
[D,S,R] = xlsread('ExampleArray.xls');
figure(1)
ribbon(D(:,1), D(:,2:end))
grid on
[X,Y] = meshgrid((1:size(D,2)-1), D(:,1));
Z = D(:,2:end);
figure(2)
surf(X, Y, Z)
grid on
8 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Creating, Deleting, and Querying Graphics Objects 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!

