Hello Guys, plese Help me !!!
Show older comments
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!
Accepted Answer
More Answers (1)
Walter Roberson
on 18 Jan 2019
0 votes
you probably need N(k)
2 Comments
Walter Roberson
on 18 Jan 2019
Yf(k)=( 1/N(k) ) * [T19(k)+T19(k-1)] ;
Image Analyst
on 18 Jan 2019
And
for k = 2 : length(T19)
so you don't get a zero index when you do T19(k-1)
Categories
Find more on Simulink in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!