Access RF Budget Power Out vs Frequency Array

조회 수: 1 (최근 30일)
temmeand
temmeand 2023년 9월 18일
답변: temmeand 2023년 11월 24일
How do I access/use the frequency-dependet values that I can plot using
rfplot(rfobj,rfpara)
I want to be able to run statistics like average and variance on the gain and power.
  댓글 수: 1
temmeand
temmeand 2023년 9월 20일
편집: temmeand 2023년 9월 20일
This appears to only give the property at one frequency point for each stage. This means that statistics would be calculated across the entire signal chain.
When plotting these values on a 3D plot, each stage can have a dependence on frequency. Simple examples are filters and amplifiers with gain that decrease with frequency. It is the property versus frequency at a particular stage that I am trying to access. Am I missing something about the dot access?

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

채택된 답변

temmeand
temmeand 2023년 11월 24일
You have to pull the data from the graph.
% rf plot, e.g.
rfplot(rfobj,rfpara)
% pull the data
h = findobj(gca, 'Type', 'line'); % find the lines plotted by rfplot
freq_cell = get(h, 'Ydata'); % extract the y-data (Input Frequency)
cell_pout = get(h, 'Zdata'); % extract the z-data (Pout)
freq = freq_cell{1}; % Input Frequency Data
cell_pout = flip(cell_pout);
pout = cell_pout{end};
fprintf("Pout average %.2f dBm with a range of %.2f dB for an input of %.2fdBm from %.1f to %.1f GHz",mean(pout), range(pout), Pin, min(freq), max(freq));

추가 답변 (1개)

UDAYA PEDDIRAJU
UDAYA PEDDIRAJU 2023년 9월 28일
Hi Temmeand,
I understand that you want to access the data plotted by the “rfplot” function. You can access this data through the "plot" object, which contains the properties of the data plotted.
Here’s an example:
h = rfplot(rfobj, rfparam);
data = h.YData;
In this code, "h" is a handle to the plot object created by “rfplot”. The “YData” property of "h" contains the y-coordinates of the data points in the plot, which should correspond to the frequency-dependent values you’re interested in.
You can then use these values to calculate statistics like average and variance. For example:
avg = mean(data);
variance = var(data);
I hope this example helps you understand the concept.
Thank you,
Uday

카테고리

Help CenterFile Exchange에서 Visualization and Data Export에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by