How to generate animated gif?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
How to generate TEC map as follows?
I would like to do it similarly but my file includes annual data. Therefore, I extracted daily data from annual data such as attached text file.
File structure:
- 1st column: Year
- 2nd column: Day of the year
- 3rd column: Hour
- 4st column: Latitude
- 5st column: Longitude
- 6st column: TEC Values
0 Kommentare
Antworten (1)
KSSV
am 17 Jun. 2019
Read this to know how to write plots to a gif.
data = importdata('data.txt') ;
y = data(:,1) ;
d = data(:,2) ;
h = data(:,3) ;
lat = data(:,4) ;
lon = data(:,5) ;
t = data(:,6) ;
%
[c,ia,ib] = unique(h) ;
for i = 1:length(c)
X = reshape(lon(ib==i),length(unique(lon)),length(unique(lat))) ;
Y = reshape(lat(ib==1),length(unique(lon)),length(unique(lat))) ;
Z = reshape(t(ib==1),length(unique(lon)),length(unique(lat))) ;
pcolor(X,Y,Z)
shading interp
title(sprintf('Hour = %s',num2str(c(i))))
drawnow
end
2 Kommentare
Dogan Deniz Karadeniz
am 21 Jun. 2019
Bearbeitet: Dogan Deniz Karadeniz
am 21 Jun. 2019
Siehe auch
Kategorien
Mehr zu Dates and Time finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!