Error in finding phase noise of an electrical oscillator...

조회 수: 9 (최근 30일)
Sibghat 2022년 9월 24일
이동: Joel Van Sickel 2022년 9월 28일
Hello everyone,
I hope you are doing well.
I recently came across the phaseNoiseMeasure method of MATLAB. I tried to run the example and it works perfectly (The example is also given on However, when I try to replace the signal data with a random Optisystem generated electrical oscillator or optical signal, it gives me an error.
The data file is also attached. Basically, what I am trying to do is generate a graph of phase noise vs frequency offset of the electrical oscillator signal.
Any help will be appreciated...
  댓글 수: 2
Jeffrey Clark
Jeffrey Clark 2022년 9월 25일
@khan, I assume the correct link is Measure and plot phase noise profile of time or frequency-domain signal - MATLAB phaseNoiseMeasure ( and specifically the examples. Please also include how you set the rbw,FrOffset, and PNTarget.
Sibghat 2022년 9월 25일
편집: Sibghat 2022년 9월 25일
@Jeffrey Clark Thank you for the feedback.
I have only replaced the frequency and power data in the example with the attached data file. The following image is the graphical illustration of the data file.
The rest of the code is unchanged.
rbw = 25e3;
FrOffset = [30e3 100e3 1e6 3e6 10e6];
PNTarget = [-56 -106 -132 -143 -152];
Looking forward to hearing from you soon...
(PS: I am new to MATLAB)

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

채택된 답변

Jeffrey Clark
Jeffrey Clark 2022년 9월 26일
이동: Joel Van Sickel 2022년 9월 28일
@khan, my guess is that your data frequency is not compatible with the other parameters; the example looks at a signal of 2.7G and yours is 20G. If you disable the plots do you get results returned?
I won't be able to help you anymore since I don't have that toolbox but now maybe someone else will.
You might try running the script with Pause on Errors set - many of the MATLAB functions' codes are available to view and will halt at the point of the error so you might be able to look at the variables and back into the code or caller to see what caused the plot vectors to be incompatible in length.
  댓글 수: 1
Sibghat 2022년 9월 27일
이동: Joel Van Sickel 2022년 9월 28일
@Jeffrey Clark Thank you for the help.
I have solved the issue by reducing the total number of samples.

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

추가 답변 (0개)


Help CenterFile Exchange에서 Phase-Locked Loops에 대해 자세히 알아보기




Community Treasure Hunt

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

Start Hunting!

Translated by