Merge branch 'femwind' of https://github.com/openwfm/wrf-fire-matlab into femwind
[wrf-fire-matlab.git] / util1_jan / read_array_m2.m
bloba125f73bce7a7186619ce8eb9a133630abb2c252
1 function a=read_array_m2(f);\r
2 b=load(f);\r
3 l=length(b);\r
4 m=b(1);\r
5 n=b(2);\r
6 s=m*n+2;\r
7 fprintf(1,'matrix size %i %i from file %s length %i should be %i\n',m,n,f,l,s)\r
8 if l~=s,\r
9     error('bad format')\r
10 end\r
11 a=reshape(b(3:m*n+2),[m,n]);\r
12 end