% compute the function y=exp (x2) * cos (20x) in the range x= -2:0.1:2.
clc
close all
x = -2: 0.1: 2;
y = cos(20*x). * exp(x.^2);
plot(x,y)

 Respuesta aceptada

Tommy
Tommy el 12 de Abr. de 2020

2 votos

Make sure the period is adjacent to the asterisk:
y = cos(20*x).* exp(x.^2);

Más respuestas (0)

Categorías

Más información sobre Entering Commands en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 12 de Abr. de 2020

Respondida:

el 12 de Abr. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by