How to Plot 3D surface
20 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
hello I have excel sheel has three columns, xyz, I wanna import the data and plot z(surface) based on the mesh xy. how can I do it? I tried to write a code as in pic
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% excel sheet has 3 columns as below
% x Y z
% - - -
% - - -
% - - -
% - - -
% how to plot Z as surfece on mesh XY ?
%
%********** IMPORT FILE FROM XLS SHEET***************%
filename = 'num.xlsx';
sheet = 1;
xlRange = 'A1:B1:C100';%%we can use another column insted of C
subsetA = xlsread(filename, sheet, xlRange);
%%ZZ=reshape(subsetA(:,100),100,100) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[X,Y] = meshgrid(0:0.15:20,0:0.15:20); Z=reshape(X,Y,Z); %H = h.reshape(10,1); surf(X,Y,Z) %%%%%%%%%%%%%%%%%%%%%%%%
thx
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Spreadsheets in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!