ドップラー効果、Calculation of Sound Frequency by Doppler Effect

Equation
V=331.5+0.6T,\;f_{o}=f_{s}(\frac{V+v_{o}}{V+v_{s}})

Scilab
doppler01doppler02

 -->clear;
-->for www=1:2
-->    funcprot(0);
-->    deff('[V]=func1(T)','V=331.5+0.6*T');
-->    deff('[fo]=func2(vs,vo)','fo=fs*((func1(T)+vo)/(func1(T)+vs))');
-->    vs=linspace(-25,25);//音源の速度(m/s)
-->    vo=linspace(-25,25);//観測者の速度(m/s)
-->    T=35;//気温(℃)
-->    fs=10;//音源の周波数(Hz)
-->    xset("window",www);clf();xgrid();
-->    condition='T(℃)='+string(T)+',fs(Hz)='+string(fs);
-->    graphtitle='Observed Frequency(Hz).' + condition;
-->    xtitle(graphtitle,'vs(m/s)','vo(m/s)','fo(Hz)',boxed=1);
-->    if www==1 then 
-->        color(240,255,240);
-->        idcolor=color(240,255,240);
-->        fplot3d(vs,vo,func2,flag=[idcolor , 2 , 4]);
-->    else
-->        contour(vs,vo,func2,30,flag=[2,2,4]);   
-->    end 
-->    currentaxes=get("current_axes");
-->    currentaxes.font_size=6;
-->    currentaxes.title.font_size=6;
-->    currentaxes.x_label.font_size=6;
-->    currentaxes.y_label.font_size=6;
-->    currentaxes.z_label.font_size=6;
-->    currentaxes.tight_limits="on";
-->    currentaxes.cube_scaling="on";
-->    currentaxes.auto_clear="on";
-->    currentaxes.auto_scale="on";
-->end
-->func1(T)
 ans  =
 
    352.5  
-->func2(-25,25)
 ans  =
 
    11.52671755725191  

SciNotes

clear;
for www=1:2
    funcprot(0);
    deff('[V]=func1(T)','V=331.5+0.6*T');
    deff('[fo]=func2(vs,vo)','fo=fs*((func1(T)+vo)/(func1(T)+vs))');
    vs=linspace(-25,25);//音源の速度(m/s)
    vo=linspace(-25,25);//観測者の速度(m/s)
    T=35;//気温(℃)
    fs=10;//音源の周波数(Hz)
    xset("window",www);clf();xgrid();
    condition='T(℃)='+string(T)+',fs(Hz)='+string(fs);
    graphtitle='Observed Frequency(Hz).' + condition;
    xtitle(graphtitle,'vs(m/s)','vo(m/s)','fo(Hz)',boxed=1);
    if www==1 then 
        color(240,255,240);
        idcolor=color(240,255,240);
        fplot3d(vs,vo,func2,flag=[idcolor , 2 , 4]);
    else
        contour(vs,vo,func2,30,flag=[2,2,4]);   
    end 
    currentaxes=get("current_axes");
    currentaxes.font_size=6;
    currentaxes.title.font_size=6;
    currentaxes.x_label.font_size=6;
    currentaxes.y_label.font_size=6;
    currentaxes.z_label.font_size=6;
    currentaxes.tight_limits="on";
    currentaxes.cube_scaling="on";
    currentaxes.auto_clear="on";
    currentaxes.auto_scale="on";
end
func1(T)
func2(-25,25)

参考文献
URL http://en.wikipedia.org/wiki/Doppler_effect

アプリケーション
Scilab http://www.scilab.org/