i want to get contour and wind vector code
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
This is a contour code. I would like to add this code to indicate the flow of the wind with a wind speed of 12 and a wind direction of 270 degrees. If possible, I would like to add the code contents using quiver, can you help me?
load_data = load('hs.mat');
data = struct2cell(load_data);
minwh=0.0;
maxwh=10.0;
t_start = datenum(2016,12,01,00,00,00);
t_step = datenum(00,00,00,01,00,00);
t_end = datenum(2016,12,02,00,00,00);
travel_time = ( t_start : t_step : t_end );
[X,Y] = meshgrid(linspace(126.85,142.15,101),linspace(35.05,48.1,86));
for i=1:length(travel_time)
DN(i) = {datestr(travel_time(i),31)};
WH_SWAN = data{i};
WH_SWAN = double(flipud(WH_SWAN));
figure(i);
[c h]=contourf(X,Y,WH_SWAN);
clabel(c,h,'fontsize',15,'labelspacing',300);
title([DN(i)],'fontsize',25);
grid on; hold on; axis tight;
caxis([minwh maxwh]); bar = colorbar;
axis([126.85 142.15 35.05 48.1])
set(get(bar,'title'),'string','Hs(m)','fontsize',20);
xlabel('Longitude','fontsize',20); ylabel('Latitude','fontsize',20);
set(gcf,'color','w','position',[200 200 600 500]);
% close(figure(i));
end
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Vector Fields 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!