Mercurial > repos > public > sbplib
comparison matlabFunctionSizePreserving.m @ 820:501750fbbfdb
Merge with feature/grids
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 07 Sep 2018 14:40:58 +0200 |
parents | 489bea7fc33f |
children |
comparison
equal
deleted
inserted
replaced
819:fdf0ef9150f4 | 820:501750fbbfdb |
---|---|
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 |