[num,den]=series(n1,d1,n2,d2,n3,d3); please tell me that in this line which error??
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
anjalee kumari
am 4 Feb. 2017
Kommentiert: anjalee kumari
am 22 Feb. 2017
[num,den]=series(n1,d1,n2,d2,n3,d3);
1 Kommentar
Akzeptierte Antwort
Les Beckham
am 4 Feb. 2017
As the documentation linked to by Star Strider indicates, series is meant to connect two models. So you will need to call the series command twice to connect your three models. Also, the num/den syntax is deprecated/obsolete and may be removed in future Matlab releases. Ideally you should define transfer function objects from your numerators and denominators.
Try this using your n1/d1, n2/d2, and n3/d3:
sys1 = tf(n1, d1)
sys2 = tf(n2, d2)
sys3 = tf(n3, d3)
sys12 = series(sys1, sys2)
sys123 = series(sys12, sys3)
Weitere Antworten (1)
John D'Errico
am 4 Feb. 2017
Bearbeitet: John D'Errico
am 4 Feb. 2017
There is no error at all. That is perfectly correct MATLAB syntax, for some (possibly unknown) general function named series.
So we cannot possibly tell you what is the "error".
In general, if you get an error in MATLAB, and want help, then read the error message. If you cannot understand the error message, then ask here, but post the COMPLETE error text, everything that was generated by MATLAB. As well, show how you called the function that caused the problem. Otherwise we cannot very easily help you, since we do not know what you did wrong.
If you think that this is correct syntax for the series function from the symbolic toolbox, I'd want to suggest that you are wrong. The series function expects you to pass in a function. Not a list of numerical values. Not a list of numbers in any form. The sym TB series function also does not return a separate numerator and denominator as outputs.
You might want to read the help for series. Or if you have some other function by that same name, then contact the source of the code. Or read the help, if any was provided.
4 Kommentare
John D'Errico
am 4 Feb. 2017
What version of MATLAB are you using?
Anyway, this is not the error I get when I try your code.
When you do a which series, what do you see? My system shows this:
which series -all
/Applications/MATLAB_R2016b.app/toolbox/symbolic/symbolic/@sym/series.m % sym method
Siehe auch
Kategorien
Mehr zu Time Series finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!