Question

In: Advanced Math

ODE: draw the phase by MATLAB ?′1=−8?1−2?2 and ?′2=2?1−4?2

ODE: draw the phase by MATLAB ?′1=−8?1−2?2 and ?′2=2?1−4?2

Solutions

Expert Solution


%Matlab code for plotting of phase space
clear all
close all

%loop for phase space plot
for i=-2:.5:2
        for j= -2:.5:2
              [t,y] = ode45(@vdp1,[0 4],[i;j]);
              hold on
              plot(y(:,1),y(:,2),'r--')
        end
      
end
%lebelling the plot
xlabel('y1')
ylabel('y2')
title('Phase space diagram')

%functions for which phase space have to draw
function dydt = vdp1(t,y)
     dydt = [-8*y(1)-2*y(2); 2*y(1)-4*y(2)];
end

%%%%%%%%%%%%%%%%% End of Code %%%%%%%%%%%%%%%%%%


Related Solutions

Show to use ode45 built-in function in MATLAB to solve the following ODE problem: dydx=x^2 /...
Show to use ode45 built-in function in MATLAB to solve the following ODE problem: dydx=x^2 / y y(0)=2   Calculate y(x) for 0 ? x ? 20 and compare the results to analytical solution y = sqrt((2x^3 / 3) + 4)
Consider the ODE y"+ 4 y'+ 4 y = 5 e^(− 2 x ). ( a)...
Consider the ODE y"+ 4 y'+ 4 y = 5 e^(− 2 x ). ( a) Verify that y 1 ( x) = e − 2 x and y 2 ( x) = xe − 2 x satisfy the corresponding homogeneous equation. (b) Use the Superposition Principle, with appropriate coefficients, to state the general solution y h ( x ) of the corresponding homogeneous equation. (c) Verify that y p ( x) = 52 x 2 e − 2 x...
6) (8 pts, 4 pts each) State the order of each ODE, then classify each of...
6) (8 pts, 4 pts each) State the order of each ODE, then classify each of them as linear/nonlinear, homogeneous/inhomogeneous, and autonomous/nonautonomous. A) Unforced Pendulum: θ′′ + γ θ′ + ω^2sin θ = 0 B) Simple RLC Circuit with a 9V Battery: Lq′′ + Rq′ +(1/c)q = 9 7) (8 pts) Find all critical points for the given DE, draw a phase line for the system, then state the stability of each critical point. Logistic Equation: y′ = ry(1 −...
MATLAB: Matrix M = [ 0 2 3 5; 7 3 8 4 ] Write one...
MATLAB: Matrix M = [ 0 2 3 5; 7 3 8 4 ] Write one command that stores all of the rows of columns 1, 2, and 3 of M into a matrix named M2.
A= 1 2 4 0 1 -2 -1 0 1 2 0 3 8 1 4...
A= 1 2 4 0 1 -2 -1 0 1 2 0 3 8 1 4 . Let W denote the row space for A. (a) Find an orthonormal basis for W and for W⊥. (b) Compute projW⊥(1 1 1 1 1 ).
Use MATLAB DSOLVE to solve the folloing ODE and plot it: 300x'' + 60x' + 6840...
Use MATLAB DSOLVE to solve the folloing ODE and plot it: 300x'' + 60x' + 6840 = f(t)
2. Use MATLAB (ode45) to solve the second-order Euler-Cauchy ODE given in the thick-walled tube elasticity...
2. Use MATLAB (ode45) to solve the second-order Euler-Cauchy ODE given in the thick-walled tube elasticity problem handout for the case: ?r(1) = 0.1, dur(1)/dr = −0.02 Have your MATLAB code print out the values for the constants you determined in the general solution; i.e. “C1 = ... , C2 = ...” make a comparison plot showing your exact solution and the numerical MATLAB result on the same axes.
A = (1 −7 5 0 0 10 8 2 2 4 10 3 −4 8...
A = (1 −7 5 0 0 10 8 2 2 4 10 3 −4 8 −9 6) (1) Count the number of rows that contain negative components. (2) Obtain the inverse of A and count the number of columns that contain even number of positive components. (3) Assign column names (a,b,c,d) to the columns of A. (4) Transform the matrix A into a vector object a by stacking rows. (5) Replace the diagonal components of A with (0,0,2,3). Hint:...
8. Draw a flow diagram for this experiment. Indicate which phase contains each of the compounds...
8. Draw a flow diagram for this experiment. Indicate which phase contains each of the compounds in the mixture. 10. Why is it essential to carefully separate the layers during an extraction? What would happen if the layers were not separated completely? 11. You are given an impure solid that contains 70% of the desired product. After extracting 15 g of the material, you recover 6 g of the pure compound. What is the correct recovery? 12. how extraction works...
1) a)draw the structure of histidine at pH 4 and at pH 8. Make sure you...
1) a)draw the structure of histidine at pH 4 and at pH 8. Make sure you clearly indicate all charges. b)Briefly describe the nature of the H-bonds that stabilize parallel and antiparallel -sheets. How do the H-bonds in these two types of secondary structure differ? You can draw simple diagrams if you wish, but there is no need for detailed structures.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT