comparison matlabFunctionSizePreserving.m @ 609:8cbecf22075b feature/utux2D

Merge to get interpolation operators.
author Martin Almquist <malmquist@stanford.edu>
date Sat, 14 Oct 2017 22:36:31 -0700
parents 489bea7fc33f
children
comparison
equal deleted inserted replaced
605:0f9d20dbb7ce 609:8cbecf22075b
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