Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Can someone help me with the code to plot this

1 visualizzazione (ultimi 30 giorni)
Ziv Melamed
Ziv Melamed il 6 Lug 2017
Chiuso: MATLAB Answer Bot il 20 Ago 2021
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 Commenti
John D'Errico
John D'Errico il 6 Lug 2017
Show what you tried. Otherwise, you are just asking us to do your homework for you.
Ziv Melamed
Ziv Melamed il 6 Lug 2017
Modificato: Walter Roberson il 6 Lug 2017
>> x=[0,1];
>> y1=sqrt((sin(x).^2)+exp(-(x/2)))
y1 =
1.0000 1.1466
>> plot(x,y1)

Risposte (1)

Walter Roberson
Walter Roberson il 6 Lug 2017
x = linspace(0,1);
  4 Commenti
Les Beckham
Les Beckham il 7 Lug 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.

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by