Inputting the function Sin(2x)Cos^2(0.5x)

8 views (last 30 days)
Shane Yazzie
Shane Yazzie on 21 Oct 2020
Edited: Stephen23 on 21 Oct 2020
I am learning to use Matlab and am having trouble inputting the function above. I've used the "." functoin but i keep getting an error while trying to comput a plot.

Answers (1)

Stephen23
Stephen23 on 21 Oct 2020
Edited: Stephen23 on 21 Oct 2020
x = linspace(0,2*pi,50);
y = sin(2*x).*cos(0.5*x).^2;
plot(x,y)

Categories

Find more on Data Type Conversion in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!