How can I plot the function y = e^(-2x^2) * cos(4pi*x - 1.5)?

조회 수: 1 (최근 30일)
emma
emma 2021년 2월 11일
댓글: emma 2021년 2월 11일
How do I plot the function of y = e^(-2x^2) * cos(4pi*x - 1.5)? This is what I have so far but I can't seem to figure out what to do for the x coordinate. Is my y correct? Please help!
x=?
y=exp(-2.*x.^2) .* cos(4.*pi.*x - 1.5)
plot(x,y)

채택된 답변

James Tursa
James Tursa 2021년 2월 11일
Pick a range for x. E.g.,
x = 0:0.01:2;
y = exp(-2.*x.^2) .* cos(4.*pi.*x - 1.5);
plot(x,y)
  댓글 수: 1
emma
emma 2021년 2월 11일
Thank you! I was entering an incorrect range. This solved my issue.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by