How to draw the contour lines in MATLAB.
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
SARVESH R
am 23 Feb. 2021
Kommentiert: Walter Roberson
am 25 Feb. 2021
Can any any one help me how to draw the contour lines in MATLAB. I have data in Excel. i Need to draw contour lines for 0.1, 0.2 till 1.
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 24 Feb. 2021
data = readmatrix('Sai.xlsx');
contour(data, 0.1:0.1:1)
colorbar
Weitere Antworten (2)
Benjamin Kraus
am 23 Feb. 2021
The answer depends in part on how the data is formatted in Excel, but something like this should get you started (see attached spreadsheet):
tbl = readtable('Peaks.xlsx');
contour(tbl.Variables,0.1:0.1:1);
4 Kommentare
Benjamin Kraus
am 24 Feb. 2021
If you replace Peaks.xlsx with Sai.xlsx, my example code seems to work fine on your data.
tbl = readtable('Sai.xlsx');
contour(tbl.Variables,0.1:0.1:1);
If you ran into some issue with that code, could you give more detail? For example, what error messages did you get? Did the picture not look like you expected?
Siehe auch
Kategorien
Mehr zu Contour Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!