Introduction and Basic Opertion of Matlab
Introduction and Basic Opertion of Matlab
Introduction and Basic Opertion of Matlab
MATLAB
sqrt(8/sqrt(4+(17^2))+(8/sqrt(46+(19^2))))^9
ans = 0.5177
Question
a=5
a=5
>> x=2
x =2
>> y=9
y =9
>> val = (exp(-a)*sin(x)+10*sqrt(y))
val = 30.0061
> k=[1 2 3 ; 7 8 0; 4 5 6]
k =1 2 3
7 8 0
4 5 6
v =10 20 30
70 80 90
40 50 0
>> p=k*v
>> p^9
ans =1.0e+28 *
Plot
a=[1,2,3,4,5,6];
>> b=[3,-2,2,4,-2,1];
>> plot(a,b)
4
Roll No 211113009
3
-1
-2
-3
-4
1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6
ROLL NO 211113009
x=0:pi/100:2*pi;
y= sin(x);
plot(x,y)
0.6
0.4
0.2
-0.2
-0.4
-0.6
-0.8
-1
0 1 2 3 4 5 6 7
ROLL NO 211113009
Vout
To Workspace
m
a
k
Diode
Discrete,
Ts = 5e-05 s.
+
powergui
AC Voltage Source +
Series RLC Branch v
-
Voltage Measurement Scope
100
80
60
40
20
-20
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04
Time (seconds)
R=9 (211113009) L=9*10-3 (211113009)
200
0
Voltage
Input
-200
0 0.01 0.02 0.03 0.04 0.05 0.06
100
Voltage
0
Output
-100
0 0.01 0.02 0.03 0.04 0.05 0.06
20
0
Current
Output
-20
0 0.01 0.02 0.03 0.04 0.05 0.06
200
100
Voltage
Diode
0
-100
0 0.01 0.02 0.03 0.04 0.05 0.06
10
Current
Input
-10
0 0.01 0.02 0.03 0.04 0.05 0.06
Time (seconds)