Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

%------------------------------------------------------ % (1) For the Matlab code below, study the code, then do the following % . (a)Type what's the code for? explaining all formulas/functions

%------------------------------------------------------ % (1) For the Matlab code below, study the code, then do the following % . (a)Type what's the code for? explaining all formulas/functions used % . (b) Plot the flowchart % . (c)Change the code so that it plots the vector field with contours (at % 5 values only) of a linear ODE system, arrows' heads on, axis tight, legend, % arrows are red-color and contours should be black if over xy-plane and % blue if under xy-plane, title, captions,.... %===================================== function myquiver xmin = 0; xmax = 25; ymin = 0; ymax = 0.5;

R=2.3; C=1.2; V=@(t) 3*sqw(t,1,10); F=@(t,VC) (V(t)-VC)/(R*C); [T,VC]=meshgrid(linspace(xmin,xmax,10),linspace(ymin,ymax,10)); S=(3*sqw(T,1,10)-VC)/(R*C); L=sqrt(1+S.^2);

x_span = xmax - xmin; y_span = ymax - ymin; % Compute the scale factor so that vectors are 10% of plot window d = 0.1; X_world = 1./L; Y_world = S./L; s = d ./ sqrt((X_world / x_span).^2 + (Y_world / y_span).^2); quiver(T,VC,s.*X_world,s.*Y_world,'r','ShowArrowhead','off','AutoScale','off') axis([xmin,xmax,ymin,ymax])

% force the axis to be square axis('square');

function y=sqw(t,T,d) r=mod(t,T); y=(r

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions