How to do a line plot with four variables?
조회 수: 1 (최근 30일)
이전 댓글 표시
I have four variables in excel sheet , time, temp, lat and lon. I have to plot temperature data (which is on different grids i.e. lat, lon as in excel sheet). I want to take number of grids longitude 1 to 144 and latitude 1 to 73. And on this grid I have to plot temp data. I am not so perfect in MATLab. I have tried a lot but I am not getting how to do it. I've tried some commands like geoshow, load topo, m_map , but not succeeded. Kindly, help me. I've attached the excel sheet with this.
Thanks and Regards
댓글 수: 0
채택된 답변
Image Analyst
2015년 8월 15일
I'm not sure how you want to handle the year (column 1), but this is what I have so far:
[numbers, txt, raw] = xlsread('book1.xls');
temp = numbers(:, 2);
x = numbers(:, 3);
y = numbers(:, 4);
% Create an image
myTempImage = zeros(max(y), max(x));
for row = 1 : length(x)
% Assign temperature at row y, column x:
myTempImage(y(row), x(row)) = temp(row);
end
imshow(myTempImage, [], 'InitialMagnification', 1600);
axis on;
myColorMap = jet(256);
myColorMap(1,:) = [0,0,0];
colormap(myColorMap);
colorbar;
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!