Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

MATLAB. Need help to plot 2 functions and fix axis so you can see y and x. 1) (e

ID: 3890031 • Letter: M

Question

MATLAB.
Need help to plot 2 functions and fix axis so you can see y and x. 1) (e^(0.05x))cos(x) 2) (e^(0.05x)cos(x)+1
I cannot get matlab to accept command where I multiply e^0.05x times cos(x).
MATLAB.
Need help to plot 2 functions and fix axis so you can see y and x. 1) (e^(0.05x))cos(x) 2) (e^(0.05x)cos(x)+1
I cannot get matlab to accept command where I multiply e^0.05x times cos(x).

Need help to plot 2 functions and fix axis so you can see y and x. 1) (e^(0.05x))cos(x) 2) (e^(0.05x)cos(x)+1
I cannot get matlab to accept command where I multiply e^0.05x times cos(x).

Explanation / Answer

%define x as whatever data range you want

x=[0:10:100]

y1=exp(0.05.*x).*cos(x)   %use dot operator before you multiply or divide as you do it for every element

y2=exp(0.05.*x).*cos(x)+1   %use dot operator before you multiply or divide as you do it for every element

graphics_toolkit('gnuplot')       %since the data range does not get accepted

hold off