Borrar filtros
Borrar filtros

Simple ODE can't be solve by dsolve

1 visualización (últimos 30 días)
Sam
Sam el 22 de Dic. de 2017
Editada: Walter Roberson el 22 de Dic. de 2017
Hello,
I'm trying to solve the following differential equation:
dx2/dt = (-x2/0.19) + (x3/12)
Both x2 and x3 are functions of time t.
My code is the following one:
syms x2(t)
syms x3(t)
vgl = (diff(x2, t) == -(x2(t)/0.19) + (x3(t)/12));
bvw = (x2(0) == 0);
Sopl(t) = dsolve(vgl, bvw)
I get the following error: Attempt to execute SCRIPT dsolve as a function: C:\Users\Gebruiker\Desktop\dsolve.m
Error in qsfdqsf (line 5) Sopl(t) = dsolve(vgl, bvw)
What do I do wrong?

Respuesta aceptada

Birdman
Birdman el 22 de Dic. de 2017
Probably you have a script named dsolve.m in your current directory and it is shadowing the function dsolve. Change the name of that script.
  3 comentarios
Birdman
Birdman el 22 de Dic. de 2017
By those two properties, dsolve does not apply simplifications to produce simpler solutions therefore the results you have are more complete.
Karan Gill
Karan Gill el 22 de Dic. de 2017
The result is expected because you solved one ODE for 2 unknown functions. So you got an expression for one unknown in terms of the other unknown.

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by