
Concept explainers
To create:
The variables for these two matrices and perform these operations “A+B”, “A-B” and “A.B”.

Answer to Problem 38E
Solution:
The variables for the given two matrices are “A = [1:1:3; 4 -1 6]”, and “B = [2 4 1; -1 3 0]” and the output of these operations “A+B”, “A-B”, and “A.B” are
Explanation of Solution
The given matrices are,
And,
Substitute
Therefore, the elements of the matrix “A+B” are
Substitute
Therefore, the elements of the matrix “A-B” are
Substitute
The multiplication of the matrix is not possible.
Now, verify the expression output through the MATLAB command.
MATLAB Code:
A = [1:1:3; 4 -1 6]
% Define the command to get the matrix “A”.
B = [2 4 1; -1 3 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”.
A*B
% Define the command to get the output of the expression “A*B”.
Save the MATLAB script with name, chapter2_45251_2_38E.m in the current folder. Execute the program by typing the script name at the command window to create the variables for given two matrices and perform the following operations “A+B”, “A-B” and “A*B”.
Result:
Therefore, the variables for the given two matrices are “A = [1:1:3; 4 -1 6]”, and “B = [2 4 1; -1 3 0]” and the output of these operations “A+B”, “A-B”, and “A.B” are
Want to see more full solutions like this?
Chapter 2 Solutions
Matlab, Fourth Edition: A Practical Introduction to Programming and Problem Solving
- The probability of a student passing an exam is 0.7. What is the probability that the student fails?arrow_forwardExplain the difference between population and sample in statistics.arrow_forwardA die is thrown once. Find the probability of getting an even number or a number greater than 4.arrow_forward
- The following data shows the daily sales (in ₹1000) of a shop for 5 days: 8, 10, 6, 12, 14. Find the range and variance.arrow_forwardA bag contains 5 red balls and 3 blue balls. One ball is drawn at random. Find the probability that it is red.arrow_forwardExplain the difference between discrete and continuous random variables with examples.arrow_forward
- Define normal distribution in one line in statistics.arrow_forwardA class has 20 boys and 30 girls. One student is chosen at random. Find the probability that it is a boy in statistics.arrow_forwardWhat is the probability of getting an even number when a die is rolled once in statistics?arrow_forward
- College Algebra (MindTap Course List)AlgebraISBN:9781305652231Author:R. David Gustafson, Jeff HughesPublisher:Cengage LearningElements Of Modern AlgebraAlgebraISBN:9781285463230Author:Gilbert, Linda, JimmiePublisher:Cengage Learning,
- College AlgebraAlgebraISBN:9781305115545Author:James Stewart, Lothar Redlin, Saleem WatsonPublisher:Cengage LearningAlgebra and Trigonometry (MindTap Course List)AlgebraISBN:9781305071742Author:James Stewart, Lothar Redlin, Saleem WatsonPublisher:Cengage LearningElementary Linear Algebra (MindTap Course List)AlgebraISBN:9781305658004Author:Ron LarsonPublisher:Cengage Learning





