Implicit scalar expansion doesn't work in MATLAB function block.
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Kaung
am 6 Aug. 2022
Kommentiert: Kaung
am 8 Aug. 2022
I spent quite a lot of time trying to figure out why the same piece of function runs in MATLAB but not in a MATLAB function block called by Simulink. Then, I saw this post made two years ago about how implicit scalar expansion doesn't work for MATLAB function blocks for some reason and using bsxfun is one way to get around that. I just wanted to check if there's any update on this issue.. I'd rather not write two separate versions of the same thing if I can avoid it.
function ans = fcn()
ans = ones(4,3) .^ ones(4,1);
0 Kommentare
Akzeptierte Antwort
Fangjun Jiang
am 8 Aug. 2022
Good news. It seems it is available in R2021b, but not in R2021a. Check
2 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!