Home

Introduction

Contents

Scripts

FeedBack

Date 06/09/2010
Script S6_2_11.m
Download Script S6_2_11.m
%==============================================
%doppler 1
%==============================================
%
%light speed in vacuum in m/sec
c=3.0e+08;
%frequency of the source
nu=1.0e+014;
%and corresponding wavelength
% lambda=c/nu;
%solutions of the equation of degree three
%(see Problem)
p=[1 -1 0 0.02];
%the alfa roots
alfa=roots(p)
%corresponding velocities
v1=alfa(1)*c
v2=alfa(2)*c
v3=alfa(3)*c
%corresponding frequencies nupC using classic formulae
nupC=nu*(1-alfa)
%and nupR using relativistic formulae
alfaq=alfa.^2;
fact=1+alfaq/2;
nupR=nupC.*fact
%
%==============================================
%source speed in the range (0,c)
v=(0.1:0.1:2.9)*10^8;
vr=v/c;
%the square of vr
qvr=vr.^2;
%
%corresponding frequencies NUpC measured
%by the observer using classic formulae
NUpC=nu*(1-vr)
%corresponding frequencies NUpR measured
%by the observer using relativistic formulae
fact1=1+qvr/2;
NUpR=NUpC.*fact1
%the delta values (see Problem)
deltaNU=(NUpR-NUpC)/nu
%plot classic (red) and relativistic (blue) frequencies
%measured by the observer versus source speed divided by (10^13Hz)
FC=NUpC/1.0e013;
FR=NUpR/1.0e013;
plot(v,FC,'ro-',v,FR,'bs- '),grid on,
title('FC(red) and FR(blue) observer measures versus source speed')
figure
%
plot(v,NUpC,'ro-',v,NUpR,'bs- '),grid on,
title('FC(red) and FR(blue) magnified varying speed from a to b')
a=4.0*1.0e+07;
b=5.0*1.0e+07;
y1=8.3*1.0e+13;
y2=8.75*1.0e+13;
axis([a b y1 y2])
%==============================================
%
Top