Sum of matrix signals in Simulink

조회 수: 2 (최근 30일)
Nishant Kumar
Nishant Kumar 2020년 4월 1일
편집: Fangjun Jiang 2020년 4월 1일
I am performing 'B = B +dB' in simulink. 'dB' is calculated using a matlab function block. Size of B and dB are identical and I have cross-checked it multiple times.
Size of B is 1*5.
Size of dB is also 1*5.
I am implementing like above. But I am getting the following error w.r.t. to the output of the function block. dW1 is connected to output port 3 of the function block.
This function does not fully set the dimensions of output port 3.
Please help me with this.

답변 (2개)

J Chen
J Chen 2020년 4월 1일
Something wrong with the dB that comes in from Inport 2. The picture shows Inport 2 has a dimension of 1 instead of 5.
  댓글 수: 3
Nishant Kumar
Nishant Kumar 2020년 4월 1일
I updated the code in function block and now implementing the update equation in the function block itself. Still, I am using the delay block to update B for next iteration of simulation. The initial values that I put into delay block is of dimension 1*5, but the block is giving a column vector. Any fix for this?
Nishant Kumar
Nishant Kumar 2020년 4월 1일
Also, I am unable to perform a simple B = B' operation in the function block.

댓글을 달려면 로그인하십시오.


Fangjun Jiang
Fangjun Jiang 2020년 4월 1일
In your MATLAB Function block, open the editor, click "Edit Data" icon, find the data for output 3, set the size.
Or, in your Simulink model, press ctrl+H, navigate to find the MATLAB Function block, find the data for output 3, set the size.
  댓글 수: 2
Nishant Kumar
Nishant Kumar 2020년 4월 1일
How to specify size of dimension 1*5?
Fangjun Jiang
Fangjun Jiang 2020년 4월 1일
편집: Fangjun Jiang 2020년 4월 1일
[1 5]

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Sources에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by