Dear all,
I have data set below. I know how to use Plot 3 with thease data, but I would like to know how to use "surf" with these data.
Thank you very much in advance.
Time Cost EQ
0 100.3000 0.783505
1 95.2000 0.793869
2 87.4000 0.80429
3 79.0000 0.814784
4 71.0000 0.825363
5 63.4000 0.836038
6 56.2000 0.846817
7 49.5000 0.857715
8 43.3000 0.868749
9 38.0000 0.879915
10 33.4000 0.891142

 Akzeptierte Antwort

KALYAN ACHARJYA
KALYAN ACHARJYA am 12 Feb. 2019
Bearbeitet: KALYAN ACHARJYA am 12 Feb. 2019

0 Stimmen

Create Time, Cost, and EQ, which must have same lengths, then apply the following, is there any issue-
surf(Time,Cost,EQ);
For more please visit documentation. Any Issue?
More way
data=xlsread('test1.xlsx');
tri=delaunay(data(:,1),data(:,2));
trisurf(tri,data(:,1),data(:,2),data(:,3))
grid on

3 Kommentare

Redwood
Redwood am 12 Feb. 2019
Dear Kalyan,
Thank you very much for your response.
I tried to use that command "surf(Time,Cost,EQ);" before.
but I got this message, "error(surfchk(dataargs{:}));"
Sincerely yours,
J1
KALYAN ACHARJYA
KALYAN ACHARJYA am 12 Feb. 2019
Bearbeitet: KALYAN ACHARJYA am 12 Feb. 2019
I have edited the answer, please check and confirm. I am considering you have collected the data in exel. Attach the sample data file as you mentioned in the question.
Redwood
Redwood am 12 Feb. 2019
Dear Kalyan,
Thank you very much!!!
Sincerely yours,
J1

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by