Home

Introduction

Contents

Scripts

FeedBack

Date 08/09/2010
Script S1_2_12.m
Download Script S1_2_12.m
%==============================================
%A sphere
%==============================================
%
%---------------------------------
%problem 1.2.12 A sphere
%determination of the value of derivative
%of the second order for "delta" function
%of "alfa" when alfa=40.1°
%
%plot of deltag function of alfag
%---------------------------------
%
%the value of refractive index and its square
n=1.66;
n2=n^2;
%preliminary assignment for alfa
arg1=(4-n2)/3;
arg2=sqrt(arg1);
%value of alfa in radians
alfa=asin(arg2);
%and in degrees
alfag=alfa*180/pi
%preliminary assignment for derivative
%of the second order
sen=sin(alfa);
senq=sen^2;
cose=cos(alfa);
coseq=cose^2;
arg3=n2-senq;
rad=sqrt(arg3);
unosurad=1/rad;
%definition of the parts of the derivative of the second order
first=sen*rad;
second=0.5*coseq*unosurad;
third=arg3;
% value of the derivative of the second order
dersec=4*((first-second)/third)
%----------------------------------------
%the plot of delta as a function of alfa
%----------------------------------------
%alfa is defined in the range 0-90°
alfag=eps:5:90;
% and in radians
alfar=alfag*pi/180;
%beta is defined in radians
arg5=(1/n)*sin(alfar);
beta=asin(arg5);
%delta is defined in radians
delta=pi+2*alfar-4*beta;
%and in degrees
deltag=delta*180/pi;
%plot of deltag function of alfag
plot(alfag,deltag,'ro-'),grid on
title('deltag function of alfag')
%==============================================
%
Top