Home > atmlab > arts > arts_tensor2y.m

arts_tensor2y

PURPOSE ^

ARTS_tensor2Y Rearrange a tensor to a measurement vector

SYNOPSIS ^

function y = arts_tensor2y(Y)

DESCRIPTION ^

 ARTS_tensor2Y   Rearrange a tensor to a measurement vector

    Reverses the rearrangement made by *arts_y2tensor*.

 FORMAT   y = arts_tensor2y(Y)
        
 OUT   y    A measurement vector, sorted as by arts.
 IN    Y    Measurement data, as returned by *arts_y2tensor*.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

arts_tensor2y.m

SOURCE CODE ^

0001 % ARTS_tensor2Y   Rearrange a tensor to a measurement vector
0002 %
0003 %    Reverses the rearrangement made by *arts_y2tensor*.
0004 %
0005 % FORMAT   y = arts_tensor2y(Y)
0006 %
0007 % OUT   y    A measurement vector, sorted as by arts.
0008 % IN    Y    Measurement data, as returned by *arts_y2tensor*.
0009 
0010 % 2011-08-29   Created by Patrick Eriksson.
0011 
0012 function y = arts_tensor2y(Y)
0013   
0014 [nf,npol,nlos,nblock] = size( Y );
0015 
0016 y = zeros( nf*npol*nlos*nblock, 1 );
0017 
0018 for i = 1 : npol
0019   y(i:npol:end) = reshape( Y(:,i,:,:), [ nf*nlos*nblock, 1 ] );
0020 end

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005