how to convert 2d data into 3d data?
1 view (last 30 days)
Show older comments
hi everyone
i have a 2d matrix data (333 x 364) which is lat and lon information. i need to add time to this data (732 x 1). i extracted time from a different data and i need to attach time to the 2d data making it 3d.
nccreate('iteration1.nc','Long','Dimensions',{'Long',length(x1)},'Format','64bit');
ncwrite('iteration1.nc','Long',x1);
nccreate('iteration1.nc','Lat','Dimensions',{'Lat',length(y1)},'Format','64bit');
ncwrite('iteration1.nc','Lat',y1);
nccreate('iteration1.nc','emission','Dimensions',{'Lat',length(y1),'Long',length(x1)},'Format','64bit');
ncwrite('iteration1.nc','emission',newemission');
the above code was used to make the 2d output data. x1 is the longitude, y1 is lattitude and new emission has the data. so in order to add a third dimension i need to make newemission into a 3d data from 2d. so how do i make newemission into a 3d data from 2d? i have time (732 x1 ) as a separate variable. i need to attach it to newemission. kindly give me suggestion on how to do it. thank you.
1 Comment
DGM
on 23 Feb 2022
Say you have one frame from a video, and you have a vector describing the timestamps for the next 700 frames. How would you turn that one frame back into a video?
There are trivial solutions. You could replicate the data, or you could fill it all with zeros or something. Otherwise, I don't know where you intend to get the rest of the data.
Answers (0)
See Also
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!