Solutions In Maths Using Matlab

Matlab, Matrix Algebra, Arithmetical Problems

In this Matlab assignment sample solution, our expert has depicted the use of Matlab for solving various types of problems in matrix algebra and arithmetic. The first part of the assignment involves the use of Matlab for solving a  problem on matrix algebra. The expert has demonstrated his expertise on wide-ranging concepts like one dimensional and two-dimensional matrix etc. In the concluding part of the assignment, the expert has provided a comprehensive solution to various arithmetical problems using Matlab.

 

SOLUTION : –

%Problem 1

clear, clc

a=[15 3 22; 3 8 5; 14 3 82];

b= [1; 5; 6];

c=[12 18 5 2];

%(a)

d=a(:,3)

%(b)

e=[b d]

%(c)

f=[b; d]

%(d)

g=[a; c(1,1:3)]

%Problem 2

clear, clc

a=[1 68 45 92

2 83 54 93

3 61 67 91

4 70 66 92

5 75 68 96

6 82 67 90

7 57 65 89

8 5 69 89

9 76 62 97

10 85 52 94

11 62 34 87

12 71 45 85

13 96 56 45

14 78 65 87

15 76 43 97

16 68 76 95

17 72 65 89

18 75 67 88

19 83 68 91

20 93 90 92]

%(a)

student_5=a(5,:)

%(b)

test_1=a(:,2)

%(c)

standard_dev=std(a(:,2:4))

variance=var(a(:,2:4))

%(d)

student_score=[a(:,1),(sum((a(:,2:4))’))’,((sum((a(:,2:4))’))’)/3];

student_score=[a(:,1),sum(a(:,2:4),2),(sum(a(:,2:4),2))/3]

%(e)

student_result=[a, student_score(:,2:3)]

%(f)

rank = sortrows(student_result,5,’descend’)

%Problem3

clear,clc

a=5^2

b=(5+3)/(5*6)

c=(4+6^3)^(1/2)

d=9+6/12+7.5^(2+3)

e=1+5.3/6^2+2^(2-4)*1/5.5

%Problem 4

%(a)

clear, clc

r=5

Area=pi*r^2

%(b)

r=10

surf_area=4*pi*r^2

%(c)

r=2

volume=4/3*pi*r^3