diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /2243/CH2 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '2243/CH2')
-rwxr-xr-x | 2243/CH2/EX2.2/Ex2_2.sce | 48 | ||||
-rwxr-xr-x | 2243/CH2/EX2.2/Fig2_2_a.jpg | bin | 0 -> 67704 bytes | |||
-rwxr-xr-x | 2243/CH2/EX2.2/Fig2_2_b.jpg | bin | 0 -> 67571 bytes | |||
-rwxr-xr-x | 2243/CH2/EX2.3/Ex2_3.sce | 23 | ||||
-rwxr-xr-x | 2243/CH2/EX2.3/Res2_3.txt | 10 | ||||
-rwxr-xr-x | 2243/CH2/EX2.6/Ex2_6.sce | 14 | ||||
-rwxr-xr-x | 2243/CH2/EX2.6/Res2_6.txt | 15 |
7 files changed, 110 insertions, 0 deletions
diff --git a/2243/CH2/EX2.2/Ex2_2.sce b/2243/CH2/EX2.2/Ex2_2.sce new file mode 100755 index 000000000..2572cf078 --- /dev/null +++ b/2243/CH2/EX2.2/Ex2_2.sce @@ -0,0 +1,48 @@ +clc();
+clear;
+// wave y= 2*sin(10*pi*t - (pi*x)/40 + pi/4)
+// (a) Plot the space profile at t= T/4
+// Comapring the given Equation with y= A*sin(omega*t - k*x + phi)
+omega = 10*%pi ; //Angular frequency in rad/s
+k= %pi/40 ; // Wave number in rad/m
+T= 1/5 ; // 2*pi/T = 10*pi , so Time period is 1/5 s
+lambda = 80; // Wavelength in m , 2*pi/lambda = pi/40 , so lambda = 80
+t1= T/4; //time period in s
+x1= 0;// in m
+printf("The Space profile of a wave y= 2*sin(10*pi*t - (pi*x)/40 + pi/4) when t= T/4\n\n")
+printf("\tx (in m) \t y1(x) (in m)\n");
+while x1<180
+y1= 2*sin((omega*t1)-(k*x1)+ (%pi/4));
+printf("\t%d\t\t%.3f\n",x1,y1);
+x1 = x1+10;
+end
+//Now, we will plot the space profile from the values obtained for y1 for each value of x1
+x_1 = [0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170];
+y_1 = [1.414214,2.000000,1.414214,0.000000,-1.414214,-2.000000,-1.414214,-0.000000,1.414214,2.000000,1.414214,0.000000,-1.414214,-2.000000,-1.414214,-0.000000,1.414214,2.000000];
+// axis centered at (0,0)
+axis=gca(); // Handle on axes entity
+axis.x_location = "origin";
+axis.y_location = "origin";
+plot(x_1,y_1,style=5);
+xtitle("Space Profile at t = T/4 for the wave y= 2*sin(10*pi*t - (pi*x)/40 + pi/4)","x (in m)","y1(x) (in m)");
+xpause(10000000);
+//(b)
+x2= lambda/8; //in m
+t2=0; // time period in s
+printf("The time profile of a wave y= 2*sin(10*pi*t - (pi*x)/40 + pi/4) when x= lambda/8\n\n")
+printf("\t t(in s) \t y2(t) (in m)\n\n");
+while t2<0.4
+ y2=2*sin((omega*t2)-(k*x2)+ (%pi/4));
+ printf("\t%.3f\t\t%.3f\n",t2,y2);
+ t2=t2+0.025;
+end
+//Now,we will plot the time profile from the values obtained for y2 ,for each value of t2
+x_2=[0,0.025,0.05,0.075,0.1,0.125,0.15,0.175,0.2,0.22500,0.250000,0.27500,0.30000,0.325000,0.350000,0.37500];
+y_2=[0.000000,1.414214,2.000000,1.414214,0.000000,-1.414214,-2.000000,-1.414214,-0.000000,1.414214,2.000000,1.414214,0.000000,-1.414214,-2.000000,-1.414214];
+// axis centered at (0,0)
+axis1=gca(); // Handle on axes entity
+axis1.x_location = "origin";
+axis1.y_location = "origin";
+plot(x_2,y_2,style= 4);
+xtitle("Time Profile at x = lambda/8 for the wave y= 2*sin(10*pi*t - (pi*x)/40 + pi/4)","t (in s)","y2(t) (in m)");
+
diff --git a/2243/CH2/EX2.2/Fig2_2_a.jpg b/2243/CH2/EX2.2/Fig2_2_a.jpg Binary files differnew file mode 100755 index 000000000..3952b9588 --- /dev/null +++ b/2243/CH2/EX2.2/Fig2_2_a.jpg diff --git a/2243/CH2/EX2.2/Fig2_2_b.jpg b/2243/CH2/EX2.2/Fig2_2_b.jpg Binary files differnew file mode 100755 index 000000000..bd7c87509 --- /dev/null +++ b/2243/CH2/EX2.2/Fig2_2_b.jpg diff --git a/2243/CH2/EX2.3/Ex2_3.sce b/2243/CH2/EX2.3/Ex2_3.sce new file mode 100755 index 000000000..09de023b8 --- /dev/null +++ b/2243/CH2/EX2.3/Ex2_3.sce @@ -0,0 +1,23 @@ +clc();
+clear;
+//Let us consider, wave function y = A*sin(omega*t - K*x + phi)
+A= 0.02;// Amplitude in m
+lambda = 6; // Wavelength (lambda) = Crest Distance = 6 m
+T= 2;// Time period is s
+nu = 1/T; // Frequency in Hz
+omega = 2*%pi*nu ; //Angular Frequency in rad/s
+k = 2*%pi/lambda; //wave number in rad/m
+//from Space profile, when x=1.5 m, t= 0
+y = 0.02; //in m
+x=1.5;//in m
+t= 0; // in s
+phi = (asin(y/A) +(k*x) - (omega*t)); // Initial phase in radians
+printf(" Wave parameters from the space profile and time profile\n")
+printf(" (1)Amplitude is %.2f m \n (2)Wavelength is %d m \n (3)Time period is %d s \n (4)Frequency is %.1f Hz \n (5)Angular Frequency is %.3f rad/s\n (6)Wave number is %.3f rad/m \n (7)Initial phase is %.3f radians\n",A,lambda,T,nu,omega,k,phi);
+// y(x,t=0) : -0.02 = 0.02*sin(0-(pi*x)/3 + pi)
+//Thus (-pi*x)/3 + pi = -pi/2,-5*pi/2, giving x= 9/2 m,21/2m
+V= omega/k; // Velocity of wave in m/s
+// I is proportional to A^2
+I = A^2; // Intensity in m^2 (Proportional)
+printf(" (8)The velocity of wave is %d m/s \n (9)Intensity is proportional to : %.1f x 10^-4 m^2.",V,I*10^4);
+
diff --git a/2243/CH2/EX2.3/Res2_3.txt b/2243/CH2/EX2.3/Res2_3.txt new file mode 100755 index 000000000..f93d845b4 --- /dev/null +++ b/2243/CH2/EX2.3/Res2_3.txt @@ -0,0 +1,10 @@ +Wave parameters from the space profile and time profile
+ (1)Amplitude is 0.02 m
+ (2)Wavelength is 6 m
+ (3)Time period is 2 s
+ (4)Frequency is 0.5 Hz
+ (5)Angular Frequency is 3.142 rad/s
+ (6)Wave number is 1.047 rad/m
+ (7)Initial phase is 3.142 radians
+ (8)The velocity of wave is 3 m/s
+ (9)Intensity is proportional to : 4.0 x 10^-4 m^2.
\ No newline at end of file diff --git a/2243/CH2/EX2.6/Ex2_6.sce b/2243/CH2/EX2.6/Ex2_6.sce new file mode 100755 index 000000000..ee2f02e6a --- /dev/null +++ b/2243/CH2/EX2.6/Ex2_6.sce @@ -0,0 +1,14 @@ +clc();
+clear;
+//(a)Tunning fork
+nu= 440; // Frequency in Hz
+V=340; // velocity of sound in air in m/s
+lambda= V/nu ;// Wavelength of sound wave in m
+k= 2*%pi/lambda; // Wave number in m
+//(b) Red Light
+nu1 = 5*10^14;// Frequency of Red light in Hz
+V1 = 3*10^8;//Velocity of light in m/s
+lambda1= V1/nu1; //Wavelength of light wave in m
+k1= 2*%pi/lambda1; // Wave number in m
+printf("For Sound wave : \n\n Frequency: %d Hz \n Velocity: %d m/s \n Wavelegth: %.3f m\n Wave number : %.2f m \n Wave Equation for Sound wave: y = A*sin((%.2f*x)-(%.3f*t)) \n\n",nu,V,lambda,k,k,(2*%pi*nu));
+printf("For Light wave : \n\n Frequency: %.0f x 10^14 Hz \n Velocity: %d x 10^8 m/s \n Wavelegth: %.1f x 10^-7 m\n Wave number : %.2f x 10^7 m \n Wave Equation for Sound wave: y = A*sin((%.2f*10^7*x)-(%.1f*10^15*t)) \n\n",nu1*10^-14,V1*10^-8,lambda1*10^7,k1*10^-7,k1*10^-7,(2*%pi*nu1*10^-15));
diff --git a/2243/CH2/EX2.6/Res2_6.txt b/2243/CH2/EX2.6/Res2_6.txt new file mode 100755 index 000000000..156aa7314 --- /dev/null +++ b/2243/CH2/EX2.6/Res2_6.txt @@ -0,0 +1,15 @@ + For Sound wave :
+
+ Frequency: 440 Hz
+ Velocity: 340 m/s
+ Wavelegth: 0.773 m
+ Wave number : 8.13 m
+ Wave Equation for Sound wave: y = A*sin((8.13*x)-(2764.602*t))
+
+For Light wave :
+
+ Frequency: 5 x 10^14 Hz
+ Velocity: 3 x 10^8 m/s
+ Wavelegth: 6.0 x 10^-7 m
+ Wave number : 1.05 x 10^7 m
+ Wave Equation for Sound wave: y = A*sin((1.05*10^7*x)-(3.1*10^15*t))
\ No newline at end of file |