I have this code, and this error :
N = 1 : length(T19);
for k = 1 : length(T19)
Yf(k)=( 1/N ) * [T19(k)+T19(k-1)] ;
end
plot(T19 , 'b');
hold on;
plot (Yf,'r');
ERRORRRRR !!!
Error using /
Matrix dimensions must agree.
PLS HELP ME!

 채택된 답변

Dombrovschi Andrei
Dombrovschi Andrei 2019년 1월 18일

0 개 추천

can you show me the code please

댓글 수: 2

Walter Roberson
Walter Roberson 2019년 1월 21일
It is not clear how "can you show me the code please" is a the Answer to your Question ??
madhan ravi
madhan ravi 2019년 1월 22일
Wow you ask a question and you accept an answer which is actually a comment , sir Walter's answer does exactly what you asked for!

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

추가 답변 (1개)

Walter Roberson
Walter Roberson 2019년 1월 18일

0 개 추천

you probably need N(k)

댓글 수: 2

Yf(k)=( 1/N(k) ) * [T19(k)+T19(k-1)] ;
And
for k = 2 : length(T19)
so you don't get a zero index when you do T19(k-1)

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

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by