x = linspace(0,10,100);
y = 3*exp(-x/3)*sin(pi*x);
plot(x, y)
xlabel('Time in Seconds')
ylabel('Voltage over time')

답변 (1개)

Voss
Voss 2021년 12월 4일

0 개 추천

You have to use .* (element-wise multiplication) rather than * (matrix multiplication):
y = 3*exp(-x/3).*sin(pi*x);

카테고리

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

질문:

2021년 12월 4일

댓글:

2021년 12월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by