MATLAB: How to solve simple differential equations how to solve simple differential equations Hi all, How can I solve this equation?! dx/dt+y=0dy/dt-x=0x(0)=3/2y(0)=0 Thanks Best Answer This way, if you have the Symbolic Math Toolbox:syms x(t) y(t)[x,y] = dsolve(diff(x) + y == 0, diff(y) - x == 0, x(0)==3/2, y(0)==0)x =(3*cos(t))/2y =(3*sin(t))/2 Related SolutionsMATLAB: Please Help Me! i want to plot a equation dx/dt = y-5; dy/dt = -x+5; x(0)=0,y(0)=0. What type of code solver should i use. syms x(t) y(t) %EDITED ANSWER ode1=diff(x) == y-5; ode2=diff(y)== -x+5; [x,y]=dsolve(ode1,ode2,x(0)==0,y(0)==0) fplot(subs(x),'r') hold on fplot(subs(y),'g') MATLAB: Como corrigo el error de los numeros positivos e integros, e intentado con el comando sym… syms y(x)Y1 = dsolve(diff(y,1)==(5/12)*(3*sin(x)^2-1), y(0)==0) Related QuestionCalculating derivative of a functionNeeds derivative w.r.t. ‘ y ‘ & then graph w.r.t ‘ t ‘Dsolve function returning empty sum
Best Answer