Changeset 646 for trunk/src/interp2_uvmat.m
 Timestamp:
 Jun 2, 2013, 4:00:34 PM (10 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/src/interp2_uvmat.m
r19 r646 1 %'interp2_uvmat': linearly interpolate an image or scalar defined on a regular grid 2 % 3 %OUTPUT: 4 % A_out: matrix of interpolated values at positions (XIMA,YIMA) 5 % 6 %INPUT: 1 7 % A matrix (npy,npx) to interpolate 2 8 %XIMA: matrix of noninteger x index values (npY,npX) 3 9 %YIMA: matrix of noninteger y index values (npY,npX), (with the same size as XIMA) 10 4 11 function A_out=interp2_uvmat(A,XIMA,YIMA) 5 12 npx=size(A,2); 6 13 npy=size(A,1); 7 14 npX=size(XIMA,2); 8 npY=size(XIMA,1) 15 npY=size(XIMA,1); 9 16 XIMA=reshape(XIMA,1,npX*npY)+0.5;%indices corresponding to XIMA, reshaped in a matlab vector 10 17 YIMA=reshape(YIMA,1,npX*npY)+0.5;%indices corresponding to XIMA, reshaped in a matlab vector
Note: See TracChangeset
for help on using the changeset viewer.