Professional Documents
Culture Documents
V𝞪I
V=RI , R=constant
where, V=P.D
I=current
R=resistance
3. Procedure:
1. Switch on your PC/laptop.
2. Go to all programs & open scilab 6.0.0.
3. Go to Scinotes.
4. Write the coding/program.
5. Save the file & use extension name .sci
6. Then execute & go to the scilab console window for output.
7. Write R=(30,5) in the scilab console window.
8. Press enter to get the output.
CODING:
function R=R(V, I)
R=V/I;
end
4. Observations:
OUTPUT:
R(30,5)
ans =
5. Conclusion:
6. Precautions or limitations:
7. Learning outcomes :
Experiment 2:
F 𝞪 x
⇒ F= k x
⇒ k= F/x
Where k= spring constant & depends on the kind of materials, its dimension & shape.
5. Procedure:
CODING:
6. Observations:
OUTPUT:
7. Conclusion:
8. Precautions or limitations:
9. Learning outcomes :
Experiment 3:
5. Procedure:
CODING:
6. Observations:
OUTPUT:
7. Conclusion:
8. Precautions or limitations:
9. Learning outcomes :
Experiment 4:
5. Procedure:
CODING:
clc
Area of square
function a=area(r)
a=r*r;
endfunction
6. Observations:
OUTPUT:
5. Procedure:
1. Switch on your PC/laptop.
2. Go to all programs & open scilab 6.0.0.
3. Go to Scinotes.
4. Write the coding/program.
5. Save the file & use extension name .sci
6. Then execute & go to the scilab console window for output.
7. Write V=vol(4) in the scilab console window.
8. Press enter to get the output.
CODING:
clc
function V=vol(r)
V=4/3*%pi*r^3;
endfunction
6. Observations:
OUTPUT:
7. Conclusion:
8. Precautions or limitations:
9. Learning outcomes :
Experiment 5:
By knowing the emf, resistance & inductance of a LR circuit, we can find out the current
flowing through it. The formula is given as
5. Procedure:
clc
function I=RL(V, R, w, L)
I=V/(R^2+(w*L)^2)^(1/2);
endfunction
6. Observations:
OUTPUT:
7. Conclusion:
8. Precautions or limitations:
9. Learning outcomes :
Experiment 6:
5. Procedure:
1. Switch on your PC/laptop.
2. Go to all programs & open scilab 6.0.0.
3. Go to Scinotes.
4. Write the coding/program.
5. Save the file & use extension name .sci
6. Then execute & go to the scilab console window for output.
7. Write I=RC(1,2,3,4) in the scilab console window.
.
CODING:
clc
function I=RC(V, R, w, C)
I=V/sqrt(R^2+(1/w*C)^2);
endfunction
6. Observations:
OUTPUT:
7. Conclusion:
8. Precautions or limitations:
9. Learning outcomes :
Experiment 6:
1. Aim of the Experiment: To find the current in a LCR circit using scilab.
2. Learning objectives of the experiment
3. Requirements a) A PC/laptop.
b)Scilab 6.0.0 must be installed.
4. Theory or principle of the experiment:
By knowing the emf V, resistance R & capacitance C of a LCR circuit, we can find
out the current I flowing through it. The formula is given as
5. Procedure:
1. Switch on your PC/laptop.
2. Go to all programs & open scilab 6.0.0.
3. Go to Scinotes.
4. Write the coding/program.
5. Save the file & use extension name .sci
6. Then execute & go to the scilab console window for output.
7. Write i=LCR(1,2,3,4) in the scilab console window.
.
CODING:
clc
function i=LCR(v, r, w, l, c)
i=v/sqrt(r^2+((w*l)-(1/w*c))^2);
endfunction
6. Observations:
OUTPUT:
7. Conclusion:
8. Precautions or limitations:
9. Learning outcomes :
Experiment 7:
1. Aim of the Experiment: To find the eigen value of a given matrix using scilab.
2. Learning objectives of the experiment
3. Requirements a) A PC/laptop.
b)Scilab 6.0.0 must be installed.
4. Theory or principle of the experiment:
The given matrix is & eigen values are found as follows.
5. Procedure:
1. Switch on your PC/laptop.
2. Go to all programs & open scilab 6.0.0.
3. Go to Scinotes.
4. Write the coding/program.
5. Save the file & use extension name .sci
6. Then execute & go to the scilab console window for output.
.
CODING:
clc
M=[0 1 ;1 0];
eig=spec(M);
[v, val]=spec(M);
disp(eig,'Eigen values are');
6. Observations:
OUTPUT:
7. Conclusion:
8. Precautions or limitations:
9. Learning outcomes :
Experiment 8:
5. Procedure:
1. Switch on your PC/laptop.
2. Go to all programs & open scilab 6.0.0.
3. Go to Scinotes.
4. Write the coding/program.
5. Save the file & use extension name .sci
6. Then execute & go to the scilab console window for output.
CODING:
clc
M=[-2 1 3; 0 -1 1; 1 2 0]
det(M);
disp(M,'The matrix is:');
disp(det(M),'The determinant of the given matrix is:');
6. Observations:
OUTPUT:
7. Conclusion:
8. Precautions or limitations:
9. Learning outcomes :
Experiment 9:
1. Aim of the Experiment: To find the inverse of a given matrix using scilab.
2. Learning objectives of the experiment
3. Requirements a) A PC/laptop.
b)Scilab 6.0.0 must be installed.
4. Theory or principle of the experiment:
5. Procedure:
CODING:
clc
M=[2 3;4 5];
N=inv(M);
disp(M,'The Matrix is:');
disp(N,'The inverse of the given matrix is:');
6. Observations:
OUTPUT:
7. Conclusion:
8. Precautions or limitations:
9. Learning outcomes :
Experiment 10:
1. Aim of the Experiment: To solve the differential equation dy/dx=-x with x(0)=0.
y(0)=-2 from x=0 to 10 with interval =1..
2. Learning objectives of the experiment
3. Requirements a) A PC/laptop.
b)Scilab 6.0.0 must be installed.
4. Theory or principle of the experiment:
5. Procedure:
1. Switch on your PC/laptop.
2. Go to all programs & open scilab 6.0.0.
3. Go to Scinotes.
4. Write the coding/program.
5. Save the file & use extension name .sci
6. Then execute & go to the scilab console window for output.
CODING:
clc
function dy=f(x, y)
dy=-x;
endfunction
x0=0;
y0=-2;
x=0:1:10;
y=ode(x0,y0,x,f);
plot(x,y);
xlabel('x');
ylabel('y');
xtitle('x v/s f(x,y)');
6. Observations:
OUTPUT:
7. Conclusion:
8. Precautions or limitations:
9. Learning outcomes :
Experiment 11:
1. Aim of the Experiment: To find spring constant 'k' from Hooke's law when mass &
time period are given using scilab..
2. Learning objectives of the experiment
3. Requirements a) A PC/laptop.
b)Scilab 6.0.0 must be installed.
4. Theory or principle of the experiment:
5. Procedure:
1. Switch on your PC/laptop.
2. Go to all programs & open scilab 6.0.0.
3. Go to Scinotes.
4. Write the coding/program.
5. Save the file & use extension name .sci
6. Then execute & go to the scilab console window for output.
7. Write k=spring (2.1,1) in the scilab console window.
CODING:
clc
function k=spring(m, T)
k=(4.0*%pi*%pi*m)/(T*T);
endfunction
6. Observations:
OUTPUT:
7. Conclusion:
8. Precautions or limitations:
9. Learning outcomes :
Experiment 12:
1. Aim of the Experiment: To evaluate & plot Bessel function of 1st kind using scilab.
2. Learning objectives of the experiment
3. Requirements a) A PC/laptop.
b)Scilab 6.0.0 must be installed.
4. Theory or principle of the experiment:
The linear second order ordinary differential equation of type
x2y′′+xy′+(x2−v2)y=0 is called the Bessel equation. The number v is called the order
of the Bessel equation.
Scilab is loaded with varieties of function to handle Bessel functions & modified
Bessel function of its 1st & 2nd kind. Here Bessel function of 1st kind is plotted.
5. Procedure:
1. Switch on your PC/laptop.
2. Go to all programs & open scilab 6.0.0.
3. Go to Scinotes.
4. Write the coding/program.
5. Save the file & use extension name .sci
6. Then execute & go to the scilab console window for output.
7. Go to scilab graphic window to write the graph.
CODING:
clf()
x = linspace(0,40,5000)';
plot2d(x,besselj(0:4,x), style=2:6, leg="J0@J1@J2@J3@J4")
legend('I'+string(0:4),1);
xtitle("Some Bessel functions of the first kind")
6. Observations:
OUTPUT:
7. Conclusion:
8. Precautions or limitations:
9. Learning outcomes :
Experiment 13:
CODING:
clc;
clf;
n=0:5;
x=[-1:0.001:1]';
y=legendre(n,0,x)';
plot2d(x,y,leg='P0@P1@P2@P3@P4@P5');
xtitle('The first six Legendre Polynomials')
ylabel('Pn(x)');
xlabel('x');
6. Observations:
OUTPUT:
7. Conclusion:
8. Precautions or limitations:
9. Learning outcomes :