Output solution as a MATLAB function.

This way, we can run the example as

    ./sim_simple | sed -n '/s1 *=/,$p' > solution.m

to obtain a MATLAB function containing the 'solution'.
This commit is contained in:
Bård Skaflestad 2013-05-06 09:43:48 +02:00
parent b06b0c99ca
commit 60509ca960

View File

@ -468,5 +468,7 @@ int main()
it += 1;
} while (res_norm > 1e-7);
std::cout << "Saturation solution:\ns1 = [\n" << s1 << "\n]\n";
std::cout << "Saturation solution:\n"
<< "function s1 = solution\n"
<< "s1 = [\n" << s1 << "\n]\n";
}