repo.or.cz
/
wrf-fire-matlab.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Merge branch 'fixf'
[wrf-fire-matlab.git]
/
fuel_left
/
fort_mat.m
blob
2e2871d40277aae8baf2295c893807d7211870ad
1
function fort_mat(s,x)
2
%s is string with variable name
3
%x is matrix to be converted into something that can be cut/paste into
4
%fortran code
5
6
[n,m] = size(x);
7
format long
8
%loop through and print
9
for i = 1:n
10
for j = 1:m
11
fprintf('%s(%d,%d) = %3.16f \n',s,i,j,x(i,j));
12
end
13
end
14
fprintf('\n')
15
16