How to do a line plot with four variables?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Gargi
el 15 de Ag. de 2015
Comentada: Gargi
el 15 de Ag. de 2015
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 comentarios
Respuesta aceptada
Image Analyst
el 15 de Ag. de 2015
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;
Más respuestas (0)
Ver también
Categorías
Más información sobre Annotations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!