plot CCDF with absolute value, not percent: now max CCDF (Y-scale) is 100% but I;d like to have 1.0
4 次查看(过去 30 天)
显示 更早的评论
采纳的回答
R
2024-6-19
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.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!