comparison subsSymfun.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 % Subs for a symfun
2 % f remains a symbolic function. If any of it's arguments is eliminated
3 % it is removed from the argument list while preserving the order of the
4 % other arguments
5 function f = subsSymfun(f, old, new)
6 args = argnames(f);
7
8 newExpr = subs(f, old, new);
9 vars = symvar(subs(args, old, new));
10
11 newArgs = args(ismember(args,vars));
12
13 f = symfun(newExpr, newArgs);
14 end