Gain and Multiply block not multplying vectors

1 回表示 (過去 30 日間)
Zachary Milgate
Zachary Milgate 2018 年 4 月 20 日
編集済み: TAB 2018 年 4 月 25 日
Hi I'm currently having the most infuriating error when trying create a feedback controller. Basically my gain and multiply blocks wont multiply 2 vectors to create a matrix. I've tried simplifying the problem down to feeding [1 2 3 4] and [1;2;3;4] into the 2 inputs of the multiply and I'm still getting [1 4 9 16] out which doesn't make sense because m trying .* to create a 4x4 matrix. When I run this command in matlab I have no problem but simulink wont create the right data. Any help would greatly be appreciated
  2 件のコメント
Birdman
Birdman 2018 年 4 月 20 日
Can you share your model?
Zachary Milgate
Zachary Milgate 2018 年 4 月 20 日
Sure the gain and multiply both have outputs with 4 elements but the matrix itself which is what im trying to create is 4x4

サインインしてコメントする。

回答 (1 件)

TAB
TAB 2018 年 4 月 25 日
編集済み: TAB 2018 年 4 月 25 日
You need to change to configure your block properly.
--> For Constant block:
Remove Interpret vector parameters as 1-D option
--> For Product and Gain block:
Set Multiplication as "Matrix"

カテゴリ

Help Center および File ExchangeSimulink Functions についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by