% 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)

 Akzeptierte Antwort

Tommy
Tommy am 12 Apr. 2020

2 Stimmen

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

Weitere Antworten (0)

Kategorien

Mehr zu Entering Commands finden Sie in Hilfe-Center und File Exchange

Tags

Gefragt:

am 12 Apr. 2020

Beantwortet:

am 12 Apr. 2020

Community Treasure Hunt

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

Start Hunting!

Translated by