Symbolic Toolbox: transforming a function y(x) to x(y)

6 Ansichten (letzte 30 Tage)
Marco Alfredo Rizzato
Marco Alfredo Rizzato am 9 Jul. 2015
Beantwortet: Ghada Saleh am 17 Jul. 2015
Hello everyone,
I have a function y(x) an need to find x(y) for x>=0.
y(x) is in the form: y(x) = a4*x^4 + a3*x^3 + a1*x
Where a4, a3, and a1 are real factors.
Is it possible to do this with Matlab's Symbolic Toolbox?
Thanks in advance, Marco R.

Antworten (1)

Ghada Saleh
Ghada Saleh am 17 Jul. 2015
Hi Marco,
You can inverse your function using functional inverse in Symbolic Math Toolbox. You can also add the constraint as an assumption on 'x'.
The following piece of code might be helpful:
>> syms x a1 a3 a4;
>> assume(x >= 0);
>> y = a4*x^4 + a3*x^3 + a1*x;
>> g = finverse(y, x)
Note that MATLAB will represent the output in terms of 'x' which should represent 'y' in your case. To illustrate, refer to the following example:
>> syms x
>> f(x) = 1/tan(x);
>> g = finverse(f)
g(x) = atan(1/x)
I hope this helps,
Ghada

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by