MATLAB Answers

how can we plot data for particular lat, long from net. file in matlab

1 view (last 30 days)
Shraddha Khandare
Shraddha Khandare on 18 Dec 2019
Commented: Walter Roberson on 18 Dec 2019
using below program i am getting plot for all lat, long.
clwcData = ncread('ciwc_july.nc','clwc');
Lon = ncread('ciwc_july.nc','longitude');
Lat = ncread('ciwc_july.nc','latitude');
Level = double(ncread('ciwc_july.nc','level'));
time = double(ncread('ciwc_july.nc','time'));
%%
% m = mean(mean(mean(clwcData(:,:,:,:),1),2),4);
% p= squeeze(m);
% plot(p,Level);
how can i plot for particular lat, long

  1 Comment

Walter Roberson
Walter Roberson on 18 Dec 2019
masklon = Lon >= minimum_lon_to_plot & Lon <= maximum_lon_to_plot;
masklat = Lat >= minimum_lat_to_plot & Lat <= maximum_lat_to_plot;
ClwcData(mask_lon, mask_lat, :, :) %guessing about the order of variables

Sign in to comment.

Answers (0)

Sign in to answer this question.

Tags


Translated by