When simulating the response to a specific input signal, the input data U must be a matrix of numeric values with at least two rows (samples) and without any NaN or Inf.
28 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
khaled elmoshrefy
am 11 Jun. 2020
Bearbeitet: khaled elmoshrefy
am 13 Jun. 2020
lsim( SS, [2;0.2], t)
this is the code ss is a state space model with 2 inputs and t is 0:0.4:10
0 Kommentare
Akzeptierte Antwort
Ameer Hamza
am 11 Jun. 2020
'u' must have as many rows as the number of elements in 't'. It seems that you want to apply step inputs. Try something like this
t = 0:0.4:10;
u = repmat([2, 0.2], numel(t), 1);
lsim(SS, u, t);
3 Kommentare
Ameer Hamza
am 12 Jun. 2020
You need to specify it as two columns. The number of rows should be the same as the number of elements in t. u is like this
u = [
2 0.2;
2 0.2;
..
..
2 0.2]; % rows same as numel(t)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Digital Filter Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!