Surface Plot Excel Data

9 views (last 30 days)
Aditya Chaugule
Aditya Chaugule on 12 Jun 2019
Commented: sameer kumar on 7 Feb 2023
I have a file in excel with varying data in x, y & z independent of each other. How do I surface plot these ?? The A column is X data (shown in black), Row 1 is Y data (shown in Red) and the Z data is found out for each corresponding values of X and Y experimentally(shown in blue).
I did import the X and Y data from excel to matlab, also one of the Z data (column B) But not the entire Z data (blue). Any suggestions.
Quest.png
  1 Comment
KSSV
KSSV on 12 Jun 2019
Attach excel file....not as image.

Sign in to comment.

Answers (1)

KSSV
KSSV on 12 Jun 2019
num = xlsread(myfile) ;
x = num(:,1) ;
y = num(1,:) ;
Z = num(2:end,2:end) ;
surf(x,y,Z) % if throws error trnspose Z
  6 Comments
KSSV
KSSV on 7 Feb 2022
T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/886870/SA.xlsx') ;
z = table2array(T) ;
surf(z)
sameer kumar
sameer kumar on 7 Feb 2023
How to restrict boundary?

Sign in to comment.

Categories

Find more on Line Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!