Professional Documents
Culture Documents
Lab 1
Lab 1
Lab 1
Instrumentation
(LAB)
Course Code: ME-316L
LAB # 1
Class: Fall-2015
Introduction 2
Parts of a system
Input (manipulated variable)
State Variables
Output (controlled Variable)
Introduction to MATLAB 4
MATLAB (Short for Matrix Laboratory)
MATLAB Environment
I. Command Window
II. Command History
III. Workspace
IV. Current Folder
Built in functions
I. sqrt, inv(matrix),abs, etc
'Basic'
A=5
B=6
C=A+B;
D=A-B;
E=A*B;
F=A/B;
C=A+B
D=A-B
E=A*B
F=A/B
Plotting in MATLAB 6
x = [0:2:18];
y=[0, 0.33, 4.13, 6.29, 6.85, 11.19, 13.19, 13.96, 16.33, 18.17];
plot (x,y)
plot(x,y)
xlabel('Time, sec')
ylabel('Distance, ft')
grid on
plot (x,y)
Hold on
z=[1:10];
plot (y,z)