Creating 4x4 Matrix Block in Simulink

In summary, the individual is looking for a way to create a 4x4 matrix in Simulink, similar to the "Create 3x3 Matrix" block. They have searched for a block but have not found one and are wondering if they are searching for the wrong thing. They need the block to multiply it with a constant, and they are asking for help finding the library or if someone can share it with them. They also mention that there must be 16 inputs and 1 output on the block. They have learned that the solution may be to modify the "Create 3x3 Matrix" block by changing the "look under mask" setting, but they are unsure of how to do this since it is currently
  • #1
vatansever44
2
0
Hello everyone,

I need to create 4x4 matrix in simulink. Not like writing in "Constant" block,
i mean 4x4 form of the "Create 3x3 Matrix".

I look everywhere but i couldn't see that block, so i thought; "am i searching wrong thing?", only you can tell me that:smile:

For example; what for i need that block:

M=[ M1 M2; M3 M4]

M1=[ sin(phi)*cos(phi) sin(phi.dot); cos(phi.dot) sin(tita.dot)^2]
(phi and tita will come with feedback, viz they are not constant)
M2, M3, M4 are like M1 and this will be created in simulink.

I need to use M to multiply it with a constant. If i would have "create 4x4 matrix block" i could make them (Ms)link to 4x4 matrix and i think problem will be solved.

If you have got that library, could you share?


By the way, there must be 16 input and 1 output on that.

for example there is 9 input(m11, m12, m13, m21, m22, m23, m31, m32, m33) on "Create 3x3 matrix" block.
Here it:
http://www.mathworks.com/help/toolbox/aeroblks/create3x3matrix.html"


Thank you for interest and help!

Best regards.
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
By the way, i have learned the solution.

when we choose(right clicked) the "create 3x3 matrix" there is "look under mask" in that shell.

you can change it to what dimension you wanted.
 
  • #3
i want the 3x3 to change to 2x6 but i cannot do it because the "look under mask" is locked so i cannot modify it and i don't know how to unlock it
 

FAQ: Creating 4x4 Matrix Block in Simulink

How do I create a 4x4 matrix block in Simulink?

To create a 4x4 matrix block in Simulink, you can use the "Matrix Concatenate" block from the Simulink library. This block allows you to specify the dimensions of your matrix and input the values for each element. You can also use the "Matrix Gain" block to create a 4x4 matrix with a single value multiplied to each element.

Can I use variables or expressions to define the elements of my 4x4 matrix block?

Yes, you can use variables or expressions to define the elements of your 4x4 matrix block. Simply use the appropriate Simulink blocks, such as "Constant" or "Expression" blocks, to input your desired values or expressions. These blocks can be connected to the appropriate inputs of the "Matrix Concatenate" or "Matrix Gain" block.

How can I perform operations on a 4x4 matrix block in Simulink?

To perform operations on a 4x4 matrix block in Simulink, you can use the "Matrix Math" block. This block allows you to perform operations such as addition, subtraction, multiplication, and inversion on your 4x4 matrix. You can also use the "Matrix Sum" block to calculate the sum of all elements in your matrix.

Is it possible to create a 4x4 matrix block with non-numeric elements?

Yes, it is possible to create a 4x4 matrix block with non-numeric elements in Simulink. You can use the "Matrix Concatenate" block and input variables or strings as your elements. Alternatively, you can use the "Matrix From Workspace" block to import data from a workspace variable or file.

Can I use a 4x4 matrix block in a Simulink model with other block types?

Yes, you can use a 4x4 matrix block in a Simulink model with other block types. The output of a 4x4 matrix block can be connected to any other block that can accept a matrix input, such as a "Sum" or "Product" block. You can also use the "Selector" block to extract specific elements from your 4x4 matrix for use with other blocks.

Similar threads

Replies
4
Views
1K
Replies
1
Views
8K
Replies
2
Views
2K
Replies
15
Views
13K
Replies
7
Views
2K
Back
Top