Why Matlab Function block don't perform operations in matrix of different size? (Matlab2019a)
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Rubem Pacelli
il 30 Gen 2020
Commentato: Rubem Pacelli
il 31 Gen 2020
In Workspace, if a you have a matrix A of size [8 5] and a matrix B of size [1 5], you could perform the following operation:
A-B
the row in B will be used for each line on A. But Matlab Function block doesn't able to perform this operation. You will recieve this error:
Size mismatch (size [8 x 5] ~= size [1 x 5])
What is the problem with handling this in the Matlab function block?
0 Commenti
Risposta accettata
Walter Roberson
il 30 Gen 2020
MATLAB Function Blocks are processed by something similar to MATLAB Coder, and do not support full MATLAB. In particular, implicit expansion is not supported at this time. Try bsxfun(@minus, A, B)
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Simulink Functions in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!