Ignore:
Timestamp:
Jun 2, 2013, 4:00:34 PM (11 years ago)
Author:
sommeria
Message:

various update, bugs to be expected

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:
    17% A matrix (npy,npx) to interpolate
    28%XIMA: matrix of non-integer x index values (npY,npX)
    39%YIMA: matrix of non-integer y index values (npY,npX), (with the same size as XIMA)
     10
    411function A_out=interp2_uvmat(A,XIMA,YIMA)
    512npx=size(A,2);
    613npy=size(A,1);
    714npX=size(XIMA,2);
    8 npY=size(XIMA,1)
     15npY=size(XIMA,1);
    916XIMA=reshape(XIMA,1,npX*npY)+0.5;%indices corresponding to XIMA, reshaped in a matlab vector
    1017YIMA=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.