How to read the data from a symbolic matrix ?

4 Ansichten (letzte 30 Tage)
R7 DR
R7 DR am 17 Mär. 2015
Beantwortet: Sean de Wolski am 17 Mär. 2015
Hi
I used the follwing code to solve a equation but the data is in a symbolic matrix format.
syms a
f=solve((c3(i)*a^3)+(c2(i)*a^2)-c1(i))
The output is in a symbolic matrix format.
How to read the data from symbolic matrix? I want to load the data to variables a,b and c.
Thanks
  1 Kommentar
Ben11
Ben11 am 17 Mär. 2015
What about
a = double(f(1));
b = double(f(2));
c = double(f(3));

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Sean de Wolski
Sean de Wolski am 17 Mär. 2015
doc subs
? This will substitute in values for a b and c. Then you could use double() or vpa() to convert to numeric form.

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