plot CCDF with absolute value, not percent: now max CCDF (Y-scale) is 100% but I;d like to have 1.0
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Noe PlotCCDF provides Y-scale in percents. The max is 100 (10^2)
I am interesting in the absolut values at Y axis i.e. 100% -> 1.0.
Is there a way hot to do it?
0 commentaires
Réponse acceptée
R
le 19 Juin 2024
Yes, there is a way to plot the CCDF with absolute values on the Y-axis. You can use the set function in MATLAB to modify the Y-axis tick labels. Here's an example:
% Generate some data
x = complex(rand(10000,1)-0.5,rand(10000,1)-0.5);
pm = powermeter(ComputeCCDF=true);
averagePower = pm(x); % power in dB
% Plot the CCDF
plotCCDF(pm,GaussianReference=true);
% Modify the Y-axis tick labels
yticks = get(gca, 'YTick');
yticklabels = arrayfun(@(x) sprintf('%.4f', x/100), yticks, 'UniformOutput', false);
set(gca, 'YTickLabel', yticklabels);
In this example, the yticks variable stores the current Y-axis tick values, and the yticklabels variable generates new tick labels by dividing each tick value by 100 and formatting it as a string with one decimal place. Finally, the set function is used to update the Y-axis tick labels.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Annotations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!