selecting and averaging rows of a matrix

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

How latitudes, longitudes and heights are represented in your matrix?

Sign in to comment.

Answers (2)

Matt J
Matt J on 11 Oct 2013
Edited: Matt J on 11 Oct 2013
Sounds like you might be looking for griddedInterpolant() or interp2().
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

Asked:

on 11 Oct 2013

Answered:

on 12 Oct 2013

Community Treasure Hunt

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

Start Hunting!