Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Solutions to Practice Exercise Questions

___________________________________________________________________________

Q:1 -> Solution:


A = [1 0 0 0; 0 1 0 0; 1 1 1 0];

[most_money, person] = max((A(:,1)*0.25) + (A(:,2)* 0.1) + (A(:,3)*0.05) +


(A(:,4)* 0.01));

person

___________________________________________________________________________

Q:2 -> Solution:

F = ((9 / 5) * C) + 32

C = (F - 32) * (5/9)

___________________________________________________________________________

Q:3 -> Solution:

sum(A.*B)/sum(B);

___________________________________________________________________________

Q:4 -> Solution:

~isempty(intersect(A,B))

___________________________________________________________________________

Q:5 -> Solution:

sum(A.*B)
___________________________________________________________________________

Enjoy MATLAB

You might also like