
































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

































































Problem Solving in Engineering with MATLAB Dr ZiaRTahir
Problem SolvinginEngineeringwithMATLAB DrZiaRTahir
Problem SolvinginEngineeringwithMATLAB DrZiaRTahir
r = 2.
r = 2.131;
r = 2.131; R = 90.121;
L = 2pir; A = pi*r^
Problem SolvinginEngineeringwithMATLAB DrZiaRTahir
Problem SolvinginEngineeringwithMATLAB DrZiaRTahir
Problem SolvinginEngineeringwithMATLAB DrZiaRTahir
y = ones( 3 , 1 ) ; Vector of 3 rows and 1 column fill in with ones
v = [1, 8, 4]; w = [7, 9, 1, - 4]; z = [v, w]; Column vectors: v = [1; 4]; w = [7; 9; - 4]; z = [v; w];
Problem SolvinginEngineeringwithMATLAB DrZiaRTahir
v = [6, 3, 1]; w = [4; 2; 0]; v*w
v = [30 60 90]; w = sind(v) This means w = [ sind(30), sind(60), sind(90)];
Problem SolvinginEngineeringwithMATLAB DrZiaRTahir
x = [0:45:720]; y = cosd(x); plot(x,y)
x = [0: 5 :720]; y = cosd(x); plot(x,y)
Problem SolvinginEngineeringwithMATLAB DrZiaRTahir
plot(x,y,'LineWidth', 4 ) 4 is the thickness of the line plot(x,y, 'r--o') r indicates red colour, -- indicates a discontinuous line o indicates symbol=circle
Problem SolvinginEngineeringwithMATLAB DrZiaRTahir
v = [10, - 12, 35, 7.5, 9 , 12, 4]; v(3)
1 2 3 4 5 6 7 10 - 12 35 7.5 9 12 4
Problem SolvinginEngineeringwithMATLAB DrZiaRTahir
v = [10, - 12, 35, 7.5, 9 , 12, 4]; v(3)
v(1:5)
1 2 3 4 5 6 7 10 - 12 35 7.5 9 12 4
Problem SolvinginEngineeringwithMATLAB DrZiaRTahir
v = [10, - 12, 35, 7.5, 9 , 12, 4]; v(3)
v(1:5) v(5:-2:1)
1 2 3 4 5 6 7 10 - 12 35 7.5 9 12 4
Problem SolvinginEngineeringwithMATLAB DrZiaRTahir
v = [10, - 12, 35, 7.5, 9 , 12, 4]; v(3)
v(1:5) v(1:2:5), v(5:-2:1)
v([1,4,6]) 1 2 3 4 5 6 7 10 - 12 35 7.5 9 12 4