Merge branch 'femwind' of https://github.com/openwfm/wrf-fire-matlab into femwind
[wrf-fire-matlab.git] / util1_jan / write_csparse.m
blob3d9e4e82c619471bcd2dbe8284c3dd8e1affdb3e
1 function write_csparse(a,name,num1,num2)
2 % function write_csparse(a,name,num1,num2)
3 % write sparse matrix in compressed column format
4 [d,x,r,v]=csparse(a);
5 if ~exist('num1','var'),
6         num1=-1;
7 end
8 if ~exist('num2','var'),
9         num2=-1;
10 end
11 id=file_name([name,'_d'],num1,num2);
12 write_m(d,id);
13 id=file_name([name,'_x'],num1,num2);
14 write_m(x,id);
15 id=file_name([name,'_r'],num1,num2);
16 write_m(r,id);
17 id=file_name([name,'_v'],num1,num2);
18 write_m(v,id);