Hello Guys, plese Help me !!!

2 次查看(过去 30 天)
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
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
you probably need N(k)
  2 个评论
Walter Roberson
Walter Roberson 2019-1-18
Yf(k)=( 1/N(k) ) * [T19(k)+T19(k-1)] ;
Image Analyst
Image Analyst 2019-1-18
And
for k = 2 : length(T19)
so you don't get a zero index when you do T19(k-1)

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Simulink 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by