Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Can someone help me with the code to plot this

1 visualización (últimos 30 días)
Ziv Melamed
Ziv Melamed el 6 de Jul. de 2017
Cerrada: MATLAB Answer Bot el 20 de Ag. de 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 comentarios
John D'Errico
John D'Errico el 6 de Jul. de 2017
Show what you tried. Otherwise, you are just asking us to do your homework for you.
Ziv Melamed
Ziv Melamed el 6 de Jul. de 2017
Editada: Walter Roberson el 6 de Jul. de 2017
>> x=[0,1];
>> y1=sqrt((sin(x).^2)+exp(-(x/2)))
y1 =
1.0000 1.1466
>> plot(x,y1)

Respuestas (1)

Walter Roberson
Walter Roberson el 6 de Jul. de 2017
x = linspace(0,1);
  4 comentarios
Les Beckham
Les Beckham el 7 de Jul. de 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
Walter Roberson el 7 de Jul. de 2017
Good catch, Les.

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by