Compute in symbolic math toolbox the result of function f(x) for x equals another symbolic expression

5 vues (au cours des 30 derniers jours)
I have two functions defined with symbolic toolbox such as:
f(x)=a*x;
g(x)=b*x^2;
I want to set to x another symbolic expression.
which is:
x=k+1;
and the then find the difference:
g(k+1)-x(k+1)
Do you know how I do it?

Réponse acceptée

Giorgos Papakonstantinou
Giorgos Papakonstantinou le 29 Jan 2013
Ok I found it.
dif=subs(g,x,k+1)-subs(f,x,k+1);

Plus de réponses (0)

Catégories

En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by