Question

In: Computer Science

Plot all four curves over 0 < t < 4 together using MATLAB. Post code in...

Plot all four curves over 0 < t < 4 together using MATLAB. Post code in the response.

C1 : x=−5+2e−tcos20t y=−5+2e−tsin20t z=4t

C2 : x=−5+2e−tcos20t y=5+2e−tsin20t z=4t

C3 : x=5+2e−tcos20t y=−5+2e−tsin20t z=4t

C4 : x=5+2e−tcos20t y=5+2e−tsin20t z=4t

Solutions

Expert Solution

clc;clear all
t=0:0.001:4; %%Creating t vector from 0 to 4 with 0.001 spacing
x1=-5+2.*exp(-t).*cos(20.*t);y1=-5+2.*exp(-t).*sin(20.*t);z1=4.*t; %%Curve 1
x2=-5+2.*exp(-t).*cos(20.*t);y2=5+2.*exp(-t).*sin(20.*t);z2=4.*t; %%Curve 2
x3=5+2.*exp(-t).*cos(20.*t);y3=-5+2.*exp(-t).*sin(20.*t);z3=4.*t; %%Curve 3
x4=5+2.*exp(-t).*cos(20.*t);y4=5+2.*exp(-t).*sin(20.*t);z4=4.*t; %%Curve 4
plot3(x1,y1,z1,x2,y2,z2,x3,y3,z3,x4,y4,z4); %%Plots all curve in one graph
xlabel('x');ylabel('y');zlabel('z') %%Adds label
legend('Plot 1','Plot 2','Plot 3','Plot 4'); %%Adds legend


Related Solutions

Using MATLAB, plot the following curves for the crank angle range of 0-360: a. For an...
Using MATLAB, plot the following curves for the crank angle range of 0-360: a. For an engine that has R=3.5 and L=110 mm, plot the piston speed Sp at engine speeds of 500 RPM, 2000 RPM, and 5000 RPM on the same plot. b. For an engine that has L=110mm and running at an engine speed of 5000 RPM, plot the piston speed Sp at R = 3, 4, and 5 on the same plot. c. For each of the...
Plot the original data and the regression “line” ************USING Matlab************. "Submit plot" USING MATLAB! USING MATLAB!...
Plot the original data and the regression “line” ************USING Matlab************. "Submit plot" USING MATLAB! USING MATLAB! USING MATLAB! ONLY BY USING MATLAB!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 14.9 The concentration of E. coli bacteria in a swimming area is monitored after a storm: t (hr)                     4           8         12        16    20 24 c (CFU/100 mL) 1600     1320   1000     890 650 560 The time is measured in hours following the end of the storm and the unit CFU is a .colony forming unit.. Use this data to estimate (a)...
Suppose that y′=0.162sin2(ty)+1. Plot y(t) from t=0 to t=4 with y(0)=1.286 using Euler's method with a...
Suppose that y′=0.162sin2(ty)+1. Plot y(t) from t=0 to t=4 with y(0)=1.286 using Euler's method with a step size of 0.4.
MATLAB question! 4. (a) Modify the code, to compute and plot the quantity E = 1/2mv^2...
MATLAB question! 4. (a) Modify the code, to compute and plot the quantity E = 1/2mv^2 + 1/2ky^2 as a function of time. What do you observe? Is the energy conserved in this case? (b) Show analytically that dE/dt < 0 for c > 0 while dE/dt > 0 for c < 0. (c) Modify the code to plot v vs y (phase plot). Comment on the behavior of the curve in the context of the motion of the spring....
Generate the first ten rows of Pascal triangle using MATLAB. Post code in the response
Generate the first ten rows of Pascal triangle using MATLAB. Post code in the response
This code is to be written in Matlab. Write a function that will plot cos(x) for...
This code is to be written in Matlab. Write a function that will plot cos(x) for x values ranging from -pi to pi in steps of 0.1, using black *'s. It will do this three times across in one Figure Window, with varying line widths. If no arguments are passed to the function, the line widths will be 1, 2, and 3. If on the other hand, an argument is passed to the function, it is multiplier for these values....
Plot the function y = 10(1 = e-x/4) over the interval 0 ≤ x ≤ xmax, using a while loop to
Plot the function y = 10(1 = e-x/4) over the interval 0 ≤ x ≤ xmax, using a while loop to determine the value of xmax such that y(xmax) = 9.8.Properly label the plot. The variable y represents force in newtons, and the variable x represents time in seconds.
Write Matlab code that solves (dy/dt)= yt^3 - 1.5y on the interval t= 0 to 2...
Write Matlab code that solves (dy/dt)= yt^3 - 1.5y on the interval t= 0 to 2 where y(0) = 1. As well as (dy/dx) = (1+4x)y^.5 on the interval x = 0 to 1 where y(0) = 1 using Matlab functions that solve any ODE using the below methods Midpoint Method Huens Method Functions need to call: Error desired number of iterations Step size Initial Interval y(0) And return Result Error of that result
Write Matlab code that solves (dy/dt)= yt^3 - 1.5y on the interval t= 0 to 2...
Write Matlab code that solves (dy/dt)= yt^3 - 1.5y on the interval t= 0 to 2 where y(0) = 1. As well as (dy/dx) = (1+4x)y^.5 on the interval x = 0 to 1 where y(0) = 1 using Matlab functions that solve any ODE using the below method Runge-Kutta Method 4th Order Functions need to call: Error desired number of iterations Step size Initial Interval y(0) And return Result Error of that result
Solve the system using an eigenvalue/eigenvector approach and plot both x(t) and y(t) over a 60...
Solve the system using an eigenvalue/eigenvector approach and plot both x(t) and y(t) over a 60 minute time interval. dx/dt= 8y/200-8x/100 dy/dt=8x/100-8y/100 inital conditions: x=0, y=100, t=0
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT