Surf plot from excel file
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am unsure on how to get this to upload to produce a surface plot. I have seen similar code such as the below but am unsure on how to convert this to function with mine
clc
clear all
T = readmatrix('C:\Users\natha\Downloads')
x = T(:,1)
y = T(:,2)
z = T(:,3)
[X,Y]=meshgrid(x,y)
surf(X,Y,z)
xlabel('X')
ylabel('Y')
zlabel('IDT Resonant Frequency')
0 comentarios
Respuestas (1)
Star Strider
el 8 de Mzo. de 2024
It would help to know what the data are, and what you want to do with the NaN values.
That aside, just plot all but the first column as a matrix —
A1 = readmatrix('IDT results.xlsx')
figure
surfc(A1(:,2:end))
colormap(turbo)
xlabel('X')
ylabel('Y')
An alternative approach would be to create ‘x’ and ‘y’ vectors or lengths 17 and 9 and then use that with meshgrid or ndgrid to create (17x9) matrices to use with the scatteredInterpolant function.and the last 9 columns of the matrix (all reshaped to produce column vectors) to create an interpolated matrix.
.
0 comentarios
Ver también
Categorías
Más información sobre Data Import from MATLAB en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
