当前位置:网站首页>[tips] get the x-axis and y-axis values of cdfplot function in MATLAB

[tips] get the x-axis and y-axis values of cdfplot function in MATLAB

2022-07-05 10:06:00 FPGA and MATLAB

stay matlab Through cdfplot Draw the cumulative distribution function curve of the data , The following procedure :

clc;
clear;
close all;
warning off;
x = rand(1,1000).^4;
cdfplot(x)

The operation results are as follows :

  So how to get from cdfplot Get the corresponding value in ? It's simple , We will make the following adjustments to the above procedure .

clc;
clear;
close all;
warning off;
x = rand(1,1000).^4;
[xx]=cdfplot(x);

x1 = xx.XData;
y1 = xx.YData;

figure;
plot(x1,y1);

After operation , Visible and direct cdfplot The output of , This explanation x1 and y1 It's from cdfplot Data extracted from .

原网站

版权声明
本文为[FPGA and MATLAB]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/186/202207050939195166.html