How to see matrix of struct type
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello, I solved a equation and the answer was:
s: [8x1 sym]
x2: [8x1 sym]
How can I see this matrix builded?
0 Kommentare
Antworten (1)
Star Strider
am 28 Mär. 2016
Bearbeitet: Star Strider
am 28 Mär. 2016
In the script, I would type after the solve call:
soln = solve( ... , [s, x2])
soln.s
soln.x2
That should display them for you.
2 Kommentare
Star Strider
am 28 Mär. 2016
I would appreciate your also posting your syms call so I can run your code.
While I’m waiting for you to post that, I would follow a different strategy, since you cannot solve for ‘x2/f’:
x2s = solve((((c8+c9+c10)*s+k8)*(-(((((x2*(k3 + c3*s) - ((x2*(m2*s^2 + (c1 + c2 + c3 + c4)*s + k1 + k2 + k3) - ((k2 + c2*s)*(f + x2*(k2 + c2*s)))/(m1*s^2 + c2*s + k2))*(m3*s^2 + (c3 + c5)*s + k3 + k5))/(k3 + c3*s))*(m4*s^2 + (c5 + c6)*s + k5 + k6))/(k5 + c5*s) + ((k5 + c5*s)*(x2*(m2*s^2 + (c1 + c2 + c3 + c4)*s + k1 + k2 + k3) - ((k2 + c2*s)*(f + x2*(k2 + c2*s)))/(m1*s^2 + c2*s + k2)))/(k3 + c3*s))*(m5*s^2 + (c6 + c7 + c8 + c9)*s + k6 + k8))/(k6 + c6*s) - ((k6 + c6*s)*(x2*(k3 + c3*s) - ((x2*(m2*s^2 + (c1 + c2 + c3 + c4)*s + k1 + k2 + k3) - ((k2 + c2*s)*(f + x2*(k2 + c2*s)))/(m1*s^2 + c2*s + k2))*(m3*s^2 + (c3 + c5)*s + k3 + k5))/(k3 + c3*s)))/(k5 + c5*s))/(c9*s))-(c9*s)*(-(((x2*(k3 + c3*s) - ((x2*(m2*s^2 + (c1 + c2 + c3 + c4)*s + k1 + k2 + k3) - ((k2 + c2*s)*(f + x2*(k2 + c2*s)))/(m1*s^2 + c2*s + k2))*(m3*s^2 + (c3 + c5)*s + k3 + k5))/(k3 + c3*s))*(m4*s^2 + (c5 + c6)*s + k5 + k6))/(k5 + c5*s) + ((k5 + c5*s)*(x2*(m2*s^2 + (c1 + c2 + c3 + c4)*s + k1 + k2 + k3) - ((k2 + c2*s)*(f + x2*(k2 + c2*s)))/(m1*s^2 + c2*s + k2)))/(k3 + c3*s))/(k6 + c6*s))), x2);
x2_by_f = simplify(x2s/f, 'steps', 10)
Siehe auch
Kategorien
Mehr zu Web Services finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!