ファブリペロー干渉計について
Afficher commentaires plus anciens
はじめてコードを書いた初心者です
ファブリぺロー干渉計の入力に対する出力を書きたいと思い書きました。
ですが、あまり上手くいきません。
間違えている場合や別の書き方があるならぜひ教えてください。
分かりにくい質問かもしれませんがよろしくお願いします。
式の内容はコメントに追記します
A=constant
R=constant
n=constant
c=constant
%
% This program simulates an Fabry-Perot
% Create an output structure similar to the input
OutputPort1 = InputPort1;
% Length variation
Length = Parameter0;
% calculate the optical signal
if(InputPort1.TypeSignal =='Optical' )
% verify how many sampled signals are in the structure
[ls, cs] = size(InputPort1.Sampled);
if( ls > 0 )
% caculate the at each signal
for counter1=1:cs
OutputPort1.Sampled(1, counter1).Signal = InputPort1.Sampled(1, counter1).Signal * ((1-A-R).^2/(1-R).^2+4*R*sin.^2*(2*pi*n*Length*f/c));
end
end
end
4 commentaires
Akira Agata
le 24 Déc 2019
図からの想像ですが、光ファイバの端面に反射膜と半透明膜を付加したファブリペロー共振器の「入力に対する出力」というのは、反射特性(反射率 vs 波長、又は反射光強度 vs 波長)のことでしょうか? より具体的には、①反射膜の反射率、半透明膜の②透過率と③反射率、④反射膜と半透明膜間の距離、の4つの値から理論式による反射特性をプロットしたい、ということでしょうか?
yu
le 24 Déc 2019
Akira Agata
le 26 Déc 2019
ファブリペロー干渉計の反射特性は、半透明膜の透過率と反射率にも依存するはずですが、この式にはそれらの項が含まれていないようです。念のため、いまいちど理論式をご確認ください。
yu
le 26 Déc 2019
Réponse acceptée
Plus de réponses (1)
Hiroumi Mita
le 23 Déc 2019
0 votes
構造体を使っているようですが、プログラムの基本は
部分から全体、簡単なものから複雑なものへ変化させることなので、基本から進めましょう。
#1. まず、この式の正誤を確認しましょう。
OutputPort1.Sampled(1, counter1).Signal = InputPort1.Sampled(1, counter1).Signal * ((1-A-R).^2/(1-R).^2+4*R*sin.^2*(2*pi*n*Length*f/c));
#2. あっているようであれば
適当な数値を各パラメータにあてはめて期待値がでるか確認しましょう。
3, 関数にします。
4.入出力を構造体にします。
このように、確実に階段を昇っていくことがプログラムのコツです。
1 commentaire
yu
le 24 Déc 2019
Catégories
En savoir plus sur 2 次元および 3 次元プロット dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
