Mercurial > repos > public > sbplib
comparison matlabFunctionSizePreserving.m @ 832:5573913a0949 feature/burgers1d
Merged with default, and updated +scheme/Burgers1D accordingly
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Tue, 11 Sep 2018 15:58:35 +0200 |
parents | 489bea7fc33f |
children |
comparison
equal
deleted
inserted
replaced
831:d0934d1143b7 | 832:5573913a0949 |
---|---|
1 % Takes a symfun and makes a better anonymous function | |
2 function fun = matlabFunctionSizePreserving(f) | |
3 mf = matlabFunction(f); | |
4 args = argnames(f); | |
5 | |
6 funStr = func2str(mf); | |
7 for i = 1:length(args) | |
8 funStr = [funStr sprintf(' + 0*%s', toString(args(i)))]; | |
9 end | |
10 | |
11 fun = str2func(funStr); | |
12 end |