Precipitation plot for a specific time

Hello,
i want to generate a plot like the one atatched, and it must be for a specific time for all latitudes. say time t=1:00 or 6:30 but for all latitudes.
thank you in advance

 Réponse acceptée

If you want it for all latitudes at a given time, then you have to fix one longitude. You can extract at a given time, at a fixed lontitude for all the latitudes.
EXample:
[X,Y,Z] = peaks(50) ;
x = X(1,:) ;
y = Y(:,1) ;
% get plot for all y's and at x = 0 ;
yi = y ;
xi = repmat(0,size(yi)) ;
zi = interp2(X,Y,Z,xi,yi) ; % you can use knnsearch too
figure
plot(yi,zi) % curve plot
figure
% plot the curve on the surf
surf(X,Y,Z)
hold on
plot3(xi,yi,zi,'k','linewidth',5)

5 commentaires

danel james
danel james le 28 Juil 2022
Great! You just understood the problem. I want to plot data for all latitudes and for a specific time and longitude. The above code though is confusing me. Where's the selection done? Data has latitude, longitude time and data contents. Thank you again
KSSV
KSSV le 28 Juil 2022
X is Longutude and Y is latitude....as you said your time is fixed..Z is the data at that point. Whats is confusing?
KSSV
KSSV le 28 Juil 2022
@danel james commented:
Time, latitude, longitude and precipitation are all stored in a data.txt file and I have to plot precipitation for all latitudes at time=10:00 and longitude=20 I want to do the extraction based on this information Thanks
KSSV
KSSV le 28 Juil 2022
This not a deal. you need to arrange your data. Attach your data.
danel james
danel james le 28 Juil 2022
Thank you so much! you made may day :)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Weather and Atmospheric Science dans Centre d'aide et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by