
plot CCDF with absolute value, not percent: now max CCDF (Y-scale) is 100% but I;d like to have 1.0
조회 수: 6 (최근 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에서 Axes Appearance에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!