Hello Guys, plese Help me !!!

2 visualizzazioni (ultimi 30 giorni)
Dombrovschi Andrei
Dombrovschi Andrei il 18 Gen 2019
Commentato: madhan ravi il 22 Gen 2019
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!

Risposta accettata

Dombrovschi Andrei
Dombrovschi Andrei il 18 Gen 2019
can you show me the code please
  2 Commenti
Walter Roberson
Walter Roberson il 21 Gen 2019
It is not clear how "can you show me the code please" is a the Answer to your Question ??
madhan ravi
madhan ravi il 22 Gen 2019
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!

Accedi per commentare.

Più risposte (1)

Walter Roberson
Walter Roberson il 18 Gen 2019
you probably need N(k)
  2 Commenti
Walter Roberson
Walter Roberson il 18 Gen 2019
Yf(k)=( 1/N(k) ) * [T19(k)+T19(k-1)] ;
Image Analyst
Image Analyst il 18 Gen 2019
And
for k = 2 : length(T19)
so you don't get a zero index when you do T19(k-1)

Accedi per commentare.

Categorie

Scopri di più su Simulink in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by