How to convert PDE into matrix form
7 次查看(过去 30 天)
显示 更早的评论
i have a partial differential equation like
m1*diff(x1(t), t, t) + c1*x1d + k1*x1 + (c2*(2*x1d - 2*x2d))/2 + (k2*(2*x1 - 2*x2))/2 =0
m2*diff(x2(t), t, t) - (c2*(2*x1d - 2*x2d))/2 - (k2*(2*x1 - 2*x2))/2 = 0
and i want to bring this form into
matrix form of x1 ,how is it possible to do in matlab
2 个评论
Torsten
2022-11-25
This is not a partial differential equation, but two second-order ordinary differential equation for functions x1 and x2.
What do you mean by "matrix form of x1" ?
回答(1 个)
Torsten
2022-11-25
编辑:Torsten
2022-11-25
Can you write this in matrix form ?
m1*diff(x1(t), t, t) + 0*m2*diff(x2(t), t, t) + (c1 + c2) * x1d - c2 * x2d + (k1 + k2) * x1 - k2 * x2 = 0
0*diff(x1(t), t, t) + m2*m2*diff(x2(t), t, t) - c2 * x1d + c2 * x2d - k2 * x1 + k2 * x2 = 0
This is something you must do by yourself. MATLAB can't help you with this (or only with a lot of effort in advance from your side).
2 个评论
Torsten
2022-11-28
编辑:Torsten
2022-11-28
But exactly this system is already written in matrix form in your attached "Matrixformulation.png" with P1(t) and P2(t) being 0. So what exactly is your question ?
I already wrote that MATLAB has no tool to convert written equations in matrix form - that's a task you have to do by yourself.
E.g. if you have the 2 equations
a1*x + b1*y = c1
a2*x + b2*y = c2
you can write them in matrix form as
U*z = w
with
U = [a1 b1 ; a2 b2], z = [x;y], w = [c1;c2]
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Geometry and Mesh 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!