How to see matrix of struct type
1 次查看(过去 30 天)
显示 更早的评论
Hello, I solved a equation and the answer was:
s: [8x1 sym]
x2: [8x1 sym]
How can I see this matrix builded?
0 个评论
回答(1 个)
Star Strider
2016-3-28
编辑:Star Strider
2016-3-28
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 个评论
Star Strider
2016-3-28
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)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Web Services 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!