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

 채택된 답변

Tommy
Tommy 2020년 4월 12일

2 개 추천

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Entering Commands에 대해 자세히 알아보기

태그

질문:

2020년 4월 12일

답변:

2020년 4월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by