Question

By Using Matlab Matcal (A, B) returns matrix A and B products, while printing the matrix...

By Using Matlab

Matcal (A, B) returns matrix A and B products, while printing the matrix computation formula in outmat. txt file as follows. (The sizes of A and B are very variable. In other words, it shall be possible to perform operation for matrix operation of 2 x 2 size, and it shall also be possible to calculate and output for 100 X 100 matrix models. )
>> A = [1 23;4 56 ; 79]
>> B = [0 0 ; 0 1 0 ; 0 1]
>> Matcal (A, B)
Ans = 1 2 3
4 5 6
79
In outmat.txt.
[1 2]x[ 0]=[123]
[4 5 6] [0 0] = [4 5 6]
[7 8 9] [0 1] = [7 8 9]

10 points if calculation results for five-to-five metrics can be printed
5 points if only 3 x 3 is possible

Homework Answers

Answer #1

code:

result:

result:

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write a MATLAB function that outputs number of values in a matrix that’s greater than a...
Write a MATLAB function that outputs number of values in a matrix that’s greater than a compare value. The function must able to take in an arbitrary size matrix. Name your script/program as “Quiz 2”. Examples : Matrix = [1 2 3; 4 5 6]           Compare_Value = 2 Output = 4 Matrix = [1 2 3 1; 4 5 6 8]           Compare_Value = 2 Output = 5
Using for loop and if statement, write a MATLAB code to plot a graph for x(t)...
Using for loop and if statement, write a MATLAB code to plot a graph for x(t) as a function of time t in the range 0 to 12 in increment of 0.01 ?(?) = 1: 0 ≤ ? ≤ 1 2? − 1 1 ≤ ? ≤ 2 3 2 ≤ ? ≤ 3 −2.5? + 10.5 3 ≤ ? ≤ 5 −2 5 ≤ ? ≤ 6 4/3 ? − 10 6 ≤ ? ≤ 9 2 9 ≤...
All these to be done in MATLAB: 1.1)Define a column vector, called “b” in MATLAB that...
All these to be done in MATLAB: 1.1)Define a column vector, called “b” in MATLAB that stored floating point numbers between 0.6 to 2.5 in increment of 0.2. 1.2)What is the size of vector b? How is the size of ‘b’ stored? Define number of rows of ‘b’ in variable ’row’ and number of columns of “b” in variable “col”. 1.3)Define matrix “A” as a 10 by 10 matrix of all “1”s. 1.4)Update matrix “A” as following: set all the...
MATLAB Create a matrix E, using A and B vectors as row 1 and row 2...
MATLAB Create a matrix E, using A and B vectors as row 1 and row 2 respectively A = 10 thru 1 B = 1 thru 4.2 with ten equally spaced elements and Find the indices (row and col) within E where (prob02a, b, c, d) E = 5 E > 4 E < 1.9 E > 1 and E < 2
MATLAB: Write a function called matrix_problem1 that takes a matrix A of positive integers as its...
MATLAB: Write a function called matrix_problem1 that takes a matrix A of positive integers as its sole input. If the assumption is wrong, the function returns an empty matrix. Otherwise, the function doubles every odd element of A and returns the resulting matrix. Notice that the output matrix will have all even elements. For example, the call B = matrix_problem([1 4; 5 2; 3 1], will make B equal to [2 4; 10 2; 6 2]. The function should work...
CHAPTER 2 MATLAB EXERCISES QUESTION 1: Enter the matrices A=[0 -4 5] and B= [-5 6...
CHAPTER 2 MATLAB EXERCISES QUESTION 1: Enter the matrices A=[0 -4 5] and B= [-5 6 7] 3 1 -2 0  -1 2 2 1 4 4 0 -3 USE MATLAB to find a) A + B b) B - 3A c) AB d) BA QUESTION 6: ENTER THE THREE MATRICES A= [1 2 3 4] B= [4 -6 3 5] 2 3 4 5 0 -3 -6 8 3 4 5 6   3 5 0 7 4 5 6 7...
1. Complex algebra problems. You can check your answer with Matlab: real, imag, abs, angle phase,...
1. Complex algebra problems. You can check your answer with Matlab: real, imag, abs, angle phase, conj. You are given: A = 1+2j ; B = 2+1j a. Find A*B, A/B, A^2 abs(A) and abs(B). Answers should be simplified in (a+bj) form. b. B in polar form (i.e. magnitude and angle in degree) c. Find exp(A) in polar and rectangular form. Hint use Euler formula. 2. Matrix operation problems. Use Matlab: A = [1 2 3; 4 5 6; 7...
Apply the row operation R1 + 2R3 → R1 on the following matrix:   2...
Apply the row operation R1 + 2R3 → R1 on the following matrix:   2 −3 1 4 2 0 6 −5 1 −1 1 0   −→ (h) True or False: The point (2, 1) is in the following feasible region: x + 2y ≤ 5, 5x − 6y < 7, and x ≥ 0, y ≥ 0. (i) True or False: (x = −1, y = 2, z = 3) is a solution to the following...
How to multiply a matrix by a scalar values in MatLab? for example X = [234...
How to multiply a matrix by a scalar values in MatLab? for example X = [234 75 98 39; 91 186 101 116; 149 136 39 119; 95 175 126 39]. Multiply each row by a different scalar e.g 2, 3, 6, 4 respectively.
MATLAB QUESTION: This must be completed using geometricrv. It is stated that as n becomes large,...
MATLAB QUESTION: This must be completed using geometricrv. It is stated that as n becomes large, the sample mean converges to the expected value: 〈?〉? → ?[?]. Use MATLAB to examine this convergence of a geometric random variable X. (a) (5 pts) Use geometricrv(0.1,100) to generate 100 sample values of X. Plot the sequence 〈?〉1,〈?〉2, … ,〈?〉100. Repeat this experiment five times, plotting all five 〈?〉? curves in the same figure. (b) (5 pts) Repeat part (a) for 1000 sample...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT