Concept explainers
To find:
The value of the expressions A.*B, A*B and B*A by hand and then verify the results in MATLAB.
Answer to Problem 2.5P
Solution:
The values of the expressions A.*B, A*B, and B*A are
Explanation of Solution
The given matrices are,
And,
Substitute
Substitute
Similarly substitute
Now, verifying the expression output by using MATLAB command.
MATLAB Code:
A = [1 4;3 3]
% Define the command to get the matrix “A”.
B = [1 2;-1 0]
% Define the command to get the matrix “B”.
A.*B
% Define the command to get the output of the expression “A.*B”.
A*B
% Define the command to get the output of the expression “A*B”.
B*A
% Define the command to get the output of the expression “B*A”.
Save the MATLAB script with name, chapter2_45251_2_5P.m in the current folder. Execute the program by typing the script name at the command window to find the value of the expressions A.*B, A*B and B*A by hand and then verify the results in MATLAB.
Result:
Therefore, the values of the expressions A.*B, A*B, and B*A are
Want to see more full solutions like this?
Chapter 2 Solutions
Matlab, Fourth Edition: A Practical Introduction to Programming and Problem Solving
- Algebra for College StudentsAlgebraISBN:9781285195780Author:Jerome E. Kaufmann, Karen L. SchwittersPublisher:Cengage LearningCalculus For The Life SciencesCalculusISBN:9780321964038Author:GREENWELL, Raymond N., RITCHEY, Nathan P., Lial, Margaret L.Publisher:Pearson Addison Wesley,Elementary Linear Algebra (MindTap Course List)AlgebraISBN:9781305658004Author:Ron LarsonPublisher:Cengage Learning
- College Algebra (MindTap Course List)AlgebraISBN:9781305652231Author:R. David Gustafson, Jeff HughesPublisher:Cengage LearningAlgebra and Trigonometry (MindTap Course List)AlgebraISBN:9781305071742Author:James Stewart, Lothar Redlin, Saleem WatsonPublisher:Cengage Learning