f(x) = (sin(x))^0.5
Show older comments
im trying to plot a graph of y = sqrt(sin(x)) for domain -10<=x<=10 however, im trying to convert my graph from left figure to the figure on the right to exclude all y-values that is non-real. Can anyone advise what must i do to the domain?

below are my attempts:
x2=-10/pi:2pi:10/pi
y=sqrt(sin(x2))
plot(x2,y,'color','blue','linewidth',2)
Accepted Answer
More Answers (0)
Categories
Find more on Creating, Deleting, and Querying Graphics Objects 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!