source: MML/trunk/mml/links/tango/matrixfortran2C.m @ 4

Last change on this file since 4 was 4, checked in by zhangj, 10 years ago

Initial import--MML version from SOLEIL@2013

File size: 475 bytes
Line 
1function B = matrixfortran2C(A)
2%MATRIXFORTRA2C - Convert a matrix from fortran to C format
3%
4%  INPUTS
5%  1. A - Input matrix in matlab (fortran) format
6%  2. B - matrix in C format
7%
8%  NOTES
9%  1. This function is a work around a binding BUG for writting a image
10%  into TANGO. So Soon to be obsolete
11
12%
13%% Writen By Laurent S. Nadolski
14
15%
16[n m] = size(A);
17
18B = ones(n*m,1)*NaN;       
19for k1 = 1:n,       
20    B(1+(k1-1)*m:k1*m) = A(k1:n:end);
21end
22
23B = reshape(B,n,m)';
Note: See TracBrowser for help on using the repository browser.