Question

i need help writing the matlab code for this!

2. The fourth order differential equation 2.(4) + 3.0 – sin(t).. + 8x = {2 can be rewritten as the following system of firs

0 0
Add a comment Improve this question Transcribed image text
Answer #1

`Hey,

Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.

clc

clear all

close all

f=@(t,x) [x(2);x(3);x(4);-8*x(1)+sin(t)*x(2)-3*x(3)+t^2];

[T,X]=ode45(f,[0,25],[1,2,3,4]);

plot(T,X);

legend('x1(t)','x2(t)','x3(t)','x4(t)');

figure;

plot(X(:,2),X(:,3));

xlabel("x_2");

ylabel('x_3');

title("Plot on x2 x3 plane");

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
i need help writing the matlab code for this! 2. The fourth order differential equation 2.(4)...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • USING MATLAB Please post code 1. Solve the 2nd order differential equation ?+89 +15y-sin(t), y(0)-1,?(0)-2 symbolically...

    USING MATLAB Please post code 1. Solve the 2nd order differential equation ?+89 +15y-sin(t), y(0)-1,?(0)-2 symbolically and numerically, and plot both results together over the time interval 0,10 sec. Provide appropriate labels on both axes, a title, and a legend that denotes each solution. Check your symbolic answer by using the Matlab DIFF function to compute the appropriate derivatives and then substituting them into the differential equation.

  • Use the attached Matlab code as a basis to solve the following ordinary differential equation usi...

    Question 1 QUESTION 2 Use the attached Matlab code as a basis to solve the following ordinary differential equation using Euler's method, with timestep of 0.1, from t-0to t-100. d)0) -0 - sin (5vt cos(у Plot y versus t from t=0 to t=100. How many local maxima are on this interval(do not include end points). Be careful to count them all! Answer should be an integer 1 w% Matlab code for the solution of Module 2 3 dt-9.1; %dt is...

  • Model and plot in Simulink the differential equation of a given system: ?̈−4?̇∗sin(?)+√?(?)∗?−3?(?)=0 with the time-dependent...

    Model and plot in Simulink the differential equation of a given system: ?̈−4?̇∗sin(?)+√?(?)∗?−3?(?)=0 with the time-dependent external input signal ?(?)=sin⁡(2?) Build a Simulink model to: ➔ Model the given differential equation. ➔ Plot x and ?̇ arranged in subplots with one above the other (see concept graphic below) in the same scope with ?̇ on top, including a legend naming each curve and axes labels. Note: • Use an appropriate source block to model the input signal y(t) • You...

  • Matlab Homework #4: Matlab Linear Systems Simulation 1.) Obtain the differential equation for the...

    Matlab Homework #4: Matlab Linear Systems Simulation 1.) Obtain the differential equation for the mechanical system shown below bi FLR) orce CN) voltege ) 2.) Obtain the differential equation for the electrical system shown below shown below OAF 3.) Find the transfer functions corresponding to the differential equations found in questions I and 2 the 4) Let the input force applied to the block of the mechanical system be zero U)-のThe initial conditions are y(0) = 10 cm and dy(0)d-0....

  • (1 point) Consider the system of differential equations dx dt = -1.6x + 0.5y, dy dt...

    (1 point) Consider the system of differential equations dx dt = -1.6x + 0.5y, dy dt = 2.5x – 3.6y. For this system, the smaller eigenvalue is -41/10 and the larger eigenvalue is -11/10 [Note-- you may want to view a phase plane plot (right click to open in a new window).] If y' Ay is a differential equation, how would the solution curves behave? All of the solutions curves would converge towards 0. (Stable node) All of the solution...

  • NOTE: I need the correct answer with every single details The two coupled differential equations: *1...

    NOTE: I need the correct answer with every single details The two coupled differential equations: *1 + 5x1 - 2x2 = 2e-t 32 - 2x1 + 2x2 = 0 Are subjected to initial conditions: x1(0) = 0 , x2(0) = 0 ,*1(0) = 0 ,*2(0) = 0 a) Find the laplace transform of the system and solve for X1(s) and X2(s). (2 points). b) Use MATLAB to find the inverse laplace transform. (2 points). c) Plot the solution from part...

  • slove in Matlab AP2. A system is modeled by the following differential equation in which X(t)...

    slove in Matlab AP2. A system is modeled by the following differential equation in which X(t) is the output and (() is the input: *+ 2x(t) + 5x(t) = 3u(t), x(0) = 0, X(t) = 2 a. Create a state-space representation of the system. b. Plot the following on the same figure for 0 st s 10 sec : i. the initial condition response (use the initial function) il the unit step response (use the step function) iii. the total...

  • I NEED THE MATLAB CODE NOT THE ANALYTICAL SOLUTION !!!! using ZIR and 5.1 Use Matlab...

    I NEED THE MATLAB CODE NOT THE ANALYTICAL SOLUTION !!!! using ZIR and 5.1 Use Matlab to find and plot the total response for the differential equation ZSR approach. (D2 +5D 6)y(t)x() where x(t) e-2t sin( 10t) u(t), and the initial conditions are: yo (0)-1 and уо (0)-2.

  • I need help with the matlab code, thank you. The purpose of this assignment is to...

    I need help with the matlab code, thank you. The purpose of this assignment is to illustrate one important difference between linear and nonlinear models of oscillating systems. In an undamped, unforced linear system, the period of a periodic solution depends only on system parameters and not on the initial conditions, but in a nonlinear system the period can depend on the initial conditions Consider the following nonlinear differential equation, which models the free, undamped motion of a block attached...

  • write MATLAB scripts to solve differential equations. Computing 1: ELE1053 Project 3E:Solving Differential Equations Project Principle...

    write MATLAB scripts to solve differential equations. Computing 1: ELE1053 Project 3E:Solving Differential Equations Project Principle Objective: Write MATLAB scripts to solve differential equations. Implementation: MatLab is an ideal environment for solving differential equations. Differential equations are a vital tool used by engineers to model, study and make predictions about the behavior of complex systems. It not only allows you to solve complex equations and systems of equations it also allows you to easily present the solutions in graphical form....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT