Implicit scalar expansion doesn't work in MATLAB function block.
조회 수: 2 (최근 30일)
이전 댓글 표시
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
채택된 답변
Fangjun Jiang
2022년 8월 8일
Good news. It seems it is available in R2021b, but not in R2021a. Check
댓글 수: 2
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Simulink Functions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!