Error: Line: 9 Column: 19 Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.

조회 수: 1 (최근 30일)
clear all
close all
x=-2:0.1:2;
y=exp(x^2)*cos(20x);
plot(y,x)
xlabel('x')
ylabel('y')
title('y=exp(x^2)*cos(20x) in the range of x=-2:0.1:2')
grid on
Trying to write a script to compute the function y=exp (x2)*cos (20x) in the range x= -2: 0.1:2. and plot a subsequent graph with the results.

채택된 답변

Birdman
Birdman 2020년 3월 25일
x=-2:0.1:2;
y=exp(x.^2).*cos(20.*x);
plot(y,x)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by