How can I plot the function y = e^(-2x^2) * cos(4pi*x - 1.5)?
조회 수: 2 (최근 30일)
이전 댓글 표시
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)
댓글 수: 0
채택된 답변
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)
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!