Help needed plotting a graph

22 views (last 30 days)
Umair Bux
Umair Bux on 13 Dec 2017
Answered: Honglei Chen on 13 Dec 2017
The task is to plot a graph of y=sinx^2 divided by x^2 this is the code i've done but it doesnt produce a graph x=linspace(0,4*pi); y=sin(x).^2/x.^2; plot(x,y)

Accepted Answer

Honglei Chen
Honglei Chen on 13 Dec 2017
You need to use ./, like
y=sin(x).^2./x.^2
HTH

More Answers (0)

Categories

Find more on Graph and Network Algorithms in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!