
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 instruction for the sum of the series
“sum(1./n)”.
Explanation of Solution
The given matrices are,
And,
Substitute
Substitute
Similarly substitute
Now, verifying the expression output by using MATLAB command.
MATLAB Code:
clc
clear all
close all
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_54793_2_5P.m in the current folder. Execute the script 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 value of the expressions A.*B, A*B, and B*A is
Want to see more full solutions like this?
Chapter 2 Solutions
MATLAB: A Practical Introduction to Programming and Problem Solving
- Do not answer!A coin is tossed three times. Find the probability of getting exactly two heads.arrow_forwardThe marks of five students are 20, 25, 30, 35, and 40. Find the mean and standard deviation.arrow_forwardThe probability of a student passing an exam is 0.7. What is the probability that the student fails?arrow_forward
- Explain 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_forwardThe 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_forward
- A 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_forwardIf P(A) = 0.3 and P(B) = 0.5 and A, B are mutually exclusive, find P(A ∪ B) in statistics.arrow_forward
- College Algebra (MindTap Course List)AlgebraISBN:9781305652231Author:R. David Gustafson, Jeff HughesPublisher:Cengage LearningElementary Linear Algebra (MindTap Course List)AlgebraISBN:9781305658004Author:Ron LarsonPublisher:Cengage LearningAlgebra for College StudentsAlgebraISBN:9781285195780Author:Jerome E. Kaufmann, Karen L. SchwittersPublisher:Cengage Learning
- Algebra and Trigonometry (MindTap Course List)AlgebraISBN:9781305071742Author:James Stewart, Lothar Redlin, Saleem WatsonPublisher:Cengage LearningElements Of Modern AlgebraAlgebraISBN:9781285463230Author:Gilbert, Linda, JimmiePublisher:Cengage Learning,Linear Algebra: A Modern IntroductionAlgebraISBN:9781285463247Author:David PoolePublisher:Cengage Learning





