selecting and averaging rows of a matrix
Show older comments
Hi!
I have a 1040 x 70 matrix of latitudes, longitudes and heights. I want to make a new matrix of latitudes and longitudes increasing in 0.5 steps, with height an average of all the previous heights within that range of latitudes/longitudes. I have tried loops and selecting rows, but am getting nowhere :(
Any advice?
1 Comment
Azzi Abdelmalek
on 11 Oct 2013
How latitudes, longitudes and heights are represented in your matrix?
Answers (2)
Sounds like you might be looking for griddedInterpolant() or interp2().
Image Analyst
on 12 Oct 2013
If your rows are in steps of 1.0 presently, and if you have the Image Processing Toolbox, you can use.
newMatrix = imresize(oldMatrix, 2.0);
Categories
Find more on Beamforming and Direction of Arrival Estimation 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!