Introduction to Simulink with Engineering Applications

2.10: The Gain Block

2.10 The Gain Block

The Gain block multiplies the input by a constant value (gain). The input and the gain can each be a scalar, vector, or matrix. We specify the value of the gain in the Gain parameter. The Multiplication parameter lets us specify element-wise or matrix multiplication. For matrix multiplication, this parameter also lets us indicate the order of the multiplicands.

Example 2.10

The model shown in Figure 2.20 performs the matrix multiplication A B where A = [1 _1 2]' and B = [2 3 4].


Figure 2.20: Model for Example 2.10

We double-click on the Constant block and we enter[1 -1 2]' The apostrophe is required to indicate that this is a column vector. Next, we double click on the Gain block, we enter the row vector [2 3 4] , and for Multiplication we choose Matrix (u*K). Initially, the Display block may show just one value with two small black triangles. This tells us that we must resize the Display block in both directions to see all the elements of the resultant 3 3 matrix.

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Industrial Winches
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.