Input/Output dimension error using Mux and Interpreted MATLAB Fcn
11 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Alessio Silva
am 17 Mai 2020
Kommentiert: Ameer Hamza
am 20 Mai 2020
Hi there,
I'm having a problem using the Interpreted MATLAB Fcn block. My mux has 4 inputs and (strangely) 2 outputs. I believe this is a backtrace error coming from the Interpreted Fcn block, which I believe is assuming only 2 inputs as well. I don't know why it is behaving like this. I have used this block several times in the past and it always worked well for 2 inputs. This is the first time I'm using more two inputs, so I'm not sure if this block has some kind of limitation in that sense.
I'm attaching the Simulink model, the Matlab function used in the Interpreted Fcn block and the errors I'm getting.
-------Simulink Model:

-------- Function used in Interpreted Function block:

--------The error I'm getting when trying to run the simulation

Thanks in advance for your help,
Alessio Silva
0 Kommentare
Akzeptierte Antwort
Ameer Hamza
am 17 Mai 2020
Instead of Interpreted Fcn block, you can use the MATLAB function block: https://www.mathworks.com/help/releases/R2020a/simulink/slref/matlabfunction.html which is much flexible to use.
3 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Simulink Functions 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!