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

조회 수: 3 (최근 30일)
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?

채택된 답변

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by