- If you select the option Interpret vector parameters as 1-D when defining your vector, the Constant block automatically treats the value as a 1-D vector with a single dimension (2 in this case). This allows multiplication as a 2x2 matrix with a vector of size 2, making the operation feasible and resulting in a vector output.
- If you uncheck the Interpret vector parameters as 1-D option when defining your vector, the Constant block treats the value as the matrix you defined (1x2 in this case). Multiplying a 2x2 matrix with a 1x2 matrix is not feasible, resulting in an error as indicated and this operation is equivalent to matrix multiplication in MATLAB.
why is it operational in simulink with some results vertical vectors as well as horizontal ones?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
ED
am 6 Sep. 2024
Bearbeitet: Shashi Kiran
am 6 Sep. 2024



why is the operation not consistent with one in the matlab?
0 Kommentare
Akzeptierte Antwort
Shashi Kiran
am 6 Sep. 2024
Bearbeitet: Shashi Kiran
am 6 Sep. 2024
I understand that you are encountering an issue with differences in how matrix multiplication is handled in Simulink compared to MATLAB.
Here the issue you are facing is because of interpretation of vectors in the Constant block.
Refer to this MATLAB R2024a documentation for further help.
Hope this helps.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Math Operations 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!