How to draw the contour lines in MATLAB.
조회 수: 2 (최근 30일)
이전 댓글 표시
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
채택된 답변
Walter Roberson
2021년 2월 24일
data = readmatrix('Sai.xlsx');
contour(data, 0.1:0.1:1)
colorbar
추가 답변 (2개)
Benjamin Kraus
2021년 2월 23일
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
Benjamin Kraus
2021년 2월 24일
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?
참고 항목
카테고리
Help Center 및 File Exchange에서 Contour Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!