How can I implement a function from a FROM block with mulltiple input signals
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
implementing a function by itself works fine as shown in first picture.(bottom highlighted)
When I implement the same method from a FROM block with 3 signals i get an error.
1 Commento
Risposte (1)
Brahmadev
il 12 Set 2023
Hi Brian,
I understand that you are trying to input an array into the "MATLAB function" block and have encountered the error "Index Expression out of bounds". The probable cause of this error is the size of the input "u" from the "From" block. The input has dimensions 1x1.
If you would like to use a concatenation of "Signal1", "Signal2" and "Signal3" as the input to the "MATLAB Function block", connect them to a "Bus Creator" block and then send them to the "Goto" block.
Also, for troubleshooting issues related to dimension mismatch or “Out of bounds” errors, you can turn on “Signal Dimensions” in Debug->Information Overlays.
You can also refer to the MathWorks documentation for “Bus Creator” and “Goto” blocks below for more information.
- https://www.mathworks.com/help/simulink/slref/buscreator.html
- https://www.mathworks.com/help/simulink/slref/goto.html
Hope this helps!
0 Commenti
Vedere anche
Categorie
Scopri di più su Sources in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!