Can someone help me with the code to plot this
Info
This question is closed. Reopen it to edit or answer.
Show older comments
Can someone tell me how to plot this function on matlab. Every time I input the function and try plotting, the graph does not look right.

2 Comments
John D'Errico
on 6 Jul 2017
Show what you tried. Otherwise, you are just asking us to do your homework for you.
Ziv Melamed
on 6 Jul 2017
Edited: Walter Roberson
on 6 Jul 2017
Answers (1)
Walter Roberson
on 6 Jul 2017
x = linspace(0,1);
4 Comments
Ziv Melamed
on 6 Jul 2017
Walter Roberson
on 6 Jul 2017
You missed a .^2 inside the exp()
Les Beckham
on 7 Jul 2017
You should check your parentheses also. As written, you are taking the square root of the entire expression instead of just the sin^2(x) portion.
Walter Roberson
on 7 Jul 2017
Good catch, Les.
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!