From: sr on 30 Jun 2010 04:17 HI friends, I have a big column matrix with 771 elements. I want to interpolate between every two rows so that my new matrix have 1541 elements in a single column. for example, my old matrix is A=[200 198 196 194.............771 elements] and my new matrix should be B=[200 199 198 197 196 195 194.........1541 elements] Can you please tell me how to do that? Thanking you in anticipation cheers
From: us on 30 Jun 2010 06:54 "sr " <ysrhcu(a)yahoo.com> wrote in message <i0euia$53i$1(a)fred.mathworks.com>... > HI friends, > > I have a big column matrix with 771 elements. I want to interpolate between every two rows so that my new matrix have 1541 elements in a single column. > > for example, my old matrix is > A=[200 > 198 > 196 > 194.............771 elements] > > and my new matrix should be > B=[200 > 199 > 198 > 197 > 196 > 195 > 194.........1541 elements] > Can you please tell me how to do that? > > Thanking you in anticipation > cheers a hint: help interp1; % <- and siblings... us
From: Matt J on 30 Jun 2010 09:40 interp1 will do it, but see this recent thread for faster alternatives http://www.mathworks.com/matlabcentral/newsreader/view_thread/284964#757552
|
Pages: 1 Prev: How to control the Colorbar/Colormap? Next: Simulation time |