Matlab Class

Sunday, May 24, 2015

Matlab code to solve differential equation D2y-2*Dy+2*y=exp(2*t)*sin(t)

%% Solving differential equation using dsolve function

y=dsolve('D2y-2*Dy+2*y=exp(2*t)*sin(t)','y(0)=-0.4','Dy(0)=-0.6','t');

%%Pretty the y
pretty(y)

%%Plot the solution

ezplot(y,[0 5])


Posted by Advaitha at 7:17 PM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

About Me

Advaitha
View my complete profile

Blog Archive

  • ▼  2015 (15)
    • ►  June (1)
    • ▼  May (14)
      • Matlab code to solve differential equation D2y-2*D...
      • Matlab code to solve the 2nd order differential eq...
      • MatLab code to Solve the 1st order differential eq...
      • MatLab code to Solve the 1st order differential eq...
      • Matlab code to Solve the 2nd order differential eq...
      • MatLab code to solve 1st order differential equat...
      • Hermitian of a complex matrix using MatLab
      • Conversion of general matrix to logical array usin...
      • Check the class of the variables in MatLab
      • Data Type check of stored variables in Matlab work...
      • Toeplitz matrix generation using Matlab
      • Generating Vandermonde Matrix in MatLab
      • Logical Array in Matlab
      • Swap Rows and Columns of the matrix using Matlab
Simple theme. Powered by Blogger.