1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
mina [271]
3 years ago
8

Write a function M-file that takes as input two matrices A and B, and as output produces

Computers and Technology
1 answer:
s344n2d4d5 [400]3 years ago
4 0

Answer:

Explanation:

The Matlab Function rowproduct.m

function C = rowproduct( A,B) % The function rowproduct.m

M = size(A); % Getting the dimension of matrix A

N = size(B); % Getting the dimension of matrix B

if(M(2)~=N(1)) % Checking the dimension

fprintf('Error in matrix dimension\n'); % print error if dimension mismatch

return; % And end the further execution of function

end % End of if condition

C = []; % initilizing the result matrix C

for k = 1:M(1) % Loop to perform the row product

C = [C;A(k,:)*B];% Computing row product and updating matrix C

end % End of loop

end % End of function

Testing the function rowproduct.m

The 2x3, 3x2 Matrix:

>> A = [ 1 2 3; 1 2 3];

>> B = [1 2; 1 2; 1 2];

>> C = rowproduct(A,B)

C =

6 12

6 12

>> A*B

ans =

6 12

6 12

The 3x4, 4x2 matrix:

>> A = [ 1 2 3 4; 1 2 3 4; 1 2 3 4];

>> B = [1 2; 1 2; 1 2; 1 2];

>> C = rowproduct(A,B)

C =

10 20

10 20

10 20

>> A*B

ans =

10 20

10 20

10 20

The 3x4 and 2x4 matrix:

>> A = [ 1 2 3 4; 1 2 3 4; 1 2 3 4];

>> B = [1 2 1 2; 1 2 1 2];

>> rowproduct(A,B)

Error in matrix dimension

You might be interested in
What will be the output of the following program? Assume the user responds with a 5.
FrozenT [24]

The output will be: You owe $ 15.0

4 0
3 years ago
Develop a command sequence would you use to alter the amount of space between the text in a text box and the text box border?.
yanalaym [24]

The use of the Line and Paragraph Spacing command can  help one to alter the amount of space between the text in a text box and the text box border.

<h3>Which command changes line spacing?</h3>

When one click on Home tab, one should click the Line and Paragraph Spacing command, and when one has select the line spacing that one needs, the selected line spacing will alter in the document.

Note that the use of the Line and Paragraph Spacing command can  help one to alter the amount of space between the text in a text box and the text box border.

Learn more about command sequence from

brainly.com/question/13258375

#SPJ1

8 0
2 years ago
Why concurrency control is needed in transaction.
choli [55]

Explanation:

Concurrency Control in Database Management System is a procedure of managing simultaneous operations without conflicting with each other. It ensures that Database transactions are performed concurrently and accurately to produce correct results without violating data integrity of the respective Database.And The ACID properties, in totality, provide a mechanism to ensure correctness and consistency of a database in a way such that each transaction is a group of operations that acts a single unit, produces consistent results, acts in isolation from other operations and updates that it makes are durably stored.

6 0
3 years ago
Which of the following is NOT true about mobile app development:
Arte-miy333 [17]

Answer:

The answer is C.

Explanation:

Websites are far quicker to develop than apps.

7 0
3 years ago
What does CRUD programming means and why do we need to learn it?
Slav-nsk [51]

Answer:

CRUD Meaning : CRUD is an acronym that comes from the world of computer programming and refers to the four functions that are considered necessary to implement a persistent storage application: create, read, update and delete.

Why we need to learn it? : The ability to create, read, update and delete items in a web application is crucial to most full stack projects. CRUD is too important to be ignored, so learning it first can really improve confidence within unfamiliar stacks.

6 0
2 years ago
Other questions:
  • You are tasked with securing a small network for a client in which the following requirements must be met: If a user on the priv
    8·1 answer
  • The concept of vertical farming allows agriculture to occur when there is not enough___Available .
    13·1 answer
  • Mike needs to write the primary objectives of a project in a project plan. In which section should he write them?
    6·1 answer
  • 110011 * 1111 binary calculation
    15·1 answer
  • To use the program service routines, the user's program makes requests to the operating system through the
    10·1 answer
  • How does a hard drive work
    15·1 answer
  • Which are among the ways you can use bitlocker encryption? (choose all that apply?
    5·1 answer
  • Label provides the code that executes if no case label is matched ​
    6·1 answer
  • A(n) _______________ is a network organization that centralizes user accounts, passwords, and access to resources.
    7·1 answer
  • HELP<br> When differentiating data, the WHAT of the data is:
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!