Access RF Budget Power Out vs Frequency Array

2 Ansichten (letzte 30 Tage)
temmeand
temmeand am 18 Sep. 2023
Beantwortet: temmeand am 24 Nov. 2023
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 Kommentar
temmeand
temmeand am 20 Sep. 2023
Bearbeitet: temmeand am 20 Sep. 2023
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?

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

temmeand
temmeand am 24 Nov. 2023
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));

Weitere Antworten (1)

UDAYA PEDDIRAJU
UDAYA PEDDIRAJU am 28 Sep. 2023
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

Kategorien

Mehr zu Visualization and Data Export finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by