How to split signal in simulink?
15 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
George Francis
am 20 Mär. 2018
Bearbeitet: Jim Riggs
am 21 Mär. 2018
Hello, I have this easy model. In matlab function block I have command ulength=length(u); and it returns me 1. It should give me 30, because in red box is set time to 30. My question is if I can split somehow the signal, because I need to use in matlab function block for loop: For example:
for k=1:30
z= [-y(k-1) u(k-1)]';
end
But it shows me error: that signal 'u' and 'y' are one dimensional with one element. So is there way how to split that signal so I could work with it like in matlab workspace?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/171414/image.png)
2 Kommentare
Birdman
am 20 Mär. 2018
What are you going to do by splitting them? Explain that and maybe we'll come up with an easier way.
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!