How to convert PDE into matrix form

6 visualizaciones (últimos 30 días)
Sandeep Nair
Sandeep Nair el 25 de Nov. de 2022
Editada: Torsten el 28 de Nov. de 2022
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 comentarios
Torsten
Torsten el 25 de Nov. de 2022
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" ?
Sandeep Nair
Sandeep Nair el 25 de Nov. de 2022
Please find the form in which i want,i have attached the fig

Iniciar sesión para comentar.

Respuestas (1)

Torsten
Torsten el 25 de Nov. de 2022
Editada: Torsten el 25 de Nov. de 2022
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 comentarios
Sandeep Nair
Sandeep Nair el 28 de Nov. de 2022
Hi,am not able to write in this form hence wanted help from this forum on how to do it
Torsten
Torsten el 28 de Nov. de 2022
Editada: Torsten el 28 de Nov. de 2022
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]

Iniciar sesión para comentar.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by