Computation of the bandwidth of a spectrum in wavelength domain

조회 수: 3 (최근 30일)
I have a spectrum that is plotted in the wavelength domain, and I need to find the bandwidth of the spectrum. I can't share the full code else, it will be overwhelming, so I saved the vectors. The bandwidth that the obw() function gives is innacurate. Please how can I find the correct bandwidth?
clear
filename1 = 'Ab.txt';
filename2 = 'lambda_axis.txt';
Ab = importdata(filename1);
lambda = importdata(filename2);
lambda_range = (lambda>1100e-12 & lambda<2000e-12);
plot(lambda(lambda_range),Ab(lambda_range));
xlim ([1.2e-9 1.9e-9]);
bw = obw(Ab,lambda);
  댓글 수: 4
David Goodmanson
David Goodmanson 2021년 8월 3일
편집: David Goodmanson 2021년 8월 3일
ok the lambda_range data has no problem but the obw result is negative, and (assuming you are staying in the wavelength domain) it appears to be on the large side by about a factor of 2. Is that the inaccuracy you have in mind?
Ikechi Ndamati
Ikechi Ndamati 2021년 8월 4일
@David Goodmanson I do not expect a 100% accuracy. However, the current bandwidt values are not even remotely close to a reasonable value. I need to know why my implementation gives unreasonable values so that I can try to solve the issue.

댓글을 달려면 로그인하십시오.

채택된 답변

David Goodmanson
David Goodmanson 2021년 8월 4일
편집: David Goodmanson 2021년 8월 4일
Hi Ikechi,
the problem is basically that there are not enouch points to work with.
lambda = lambdaaxis;
lambda_range = (lambda>1100e-12 & lambda<2000e-12);
lam1 = lambda(lambda_range);
A1 = Ab(lambda_range);
bw = obw(A1,lam1)
% bw = -8.8591e-10
% add a lot of interpolated points
a = min(lam1);
b = max(lam1);
lamnew = linspace(a,b,10000);
Anew = interp1(lam1,A1,lamnew);
figure(1); grid on
plot(lamnew,Anew)
bw1 = obw(Anew,lamnew)
% bw1 = 4.2769e-10
  댓글 수: 3
David Goodmanson
David Goodmanson 2021년 8월 5일
Hi Ikechi,
I didn't really know that it would work, I just tried it. One of the great things about Matlab is since it's an interpreted language, it's easy to try stuff. There was some reason to believe that the number of points might be involved, though. Lambda_range has 245 points. obw says it uses periodogram, and periodogram says it uses a minimum of 256 points, so increasing the number of points seemed like a worthwhile exercise.
Ikechi Ndamati
Ikechi Ndamati 2021년 8월 6일
Hello David, that's smart.
Thanks for the insight. I will apply this tactics in future problems.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Parametric Spectral Estimation에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by