Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

what is "Error using ==> mtimes Inner matrix dimensions must agree."

조회 수: 1 (최근 30일)
Mustafa Ahmed
Mustafa Ahmed 2020년 11월 17일
마감: MATLAB Answer Bot 2021년 8월 20일
The question says write a matlab code to draw praph of F(t) in the interval 0 <= t <= 4, increase by 0.05

답변 (2개)

Ameer Hamza
Ameer Hamza 2020년 11월 17일
Since 't' is a vector, use element-wise operators: https://www.mathworks.com/help/matlab/matlab_prog/array-vs-matrix-operations.html. Replace / with ./ and * with .*

Andrei Bobrov
Andrei Bobrov 2020년 11월 17일
t = 0:0.05:4;
y = t.^2./ (t+1) + 3*exp(-4*t).*cos(5*t) - 2*exp(-3*t)./sin(2*t);

태그

Community Treasure Hunt

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

Start Hunting!

Translated by