Surface Plot Excel Data
이전 댓글 표시
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.

댓글 수: 1
KSSV
2019년 6월 12일
Attach excel file....not as image.
답변 (1개)
KSSV
2019년 6월 12일
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
Aditya Chaugule
2019년 6월 13일
KSSV
2019년 6월 13일
Thanks is accepting and/or voting the answer ...:)
JEONGMIN KIM
2021년 6월 9일
thanks man
Hammad Masood
2022년 2월 7일
I tried to do the above but got the following error,
Error using surf (line 71)
Data dimensions must agree.
Tried transposing but that isn't working also. Please help.
My file is also attached.
T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/886870/SA.xlsx') ;
z = table2array(T) ;
surf(z)
sameer kumar
2023년 2월 7일
How to restrict boundary?
카테고리
도움말 센터 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
