Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Algorithm 确定数据的最佳截止值(在matlab中)_Algorithm_Matlab_Statistics - Fatal编程技术网

Algorithm 确定数据的最佳截止值(在matlab中)

Algorithm 确定数据的最佳截止值(在matlab中),algorithm,matlab,statistics,Algorithm,Matlab,Statistics,我意识到这是一个不具体的问题,因为我对这个话题了解不多,请在这方面帮助我,这就是我想要完成的任务: 找到一个统计上合理的算法,以确定最佳截止值,对向量进行二值化,过滤掉最小值,即去除。以下是matlab中的代码,用于可视化此问题: randomdata=rand(1,100,1); figure;plot(randomdata); %plot random data between 0 and 1 cutoff=0.5; %plot cut-off value line(get(gca,'xli

我意识到这是一个不具体的问题,因为我对这个话题了解不多,请在这方面帮助我,这就是我想要完成的任务:

找到一个统计上合理的算法,以确定最佳截止值,对向量进行二值化,过滤掉最小值,即去除。以下是matlab中的代码,用于可视化此问题:

randomdata=rand(1,100,1);
figure;plot(randomdata); %plot random data between 0 and 1
cutoff=0.5; %plot cut-off value
line(get(gca,'xlim'),[cutoff cutoff],'Color','red');

谢谢

您可以尝试使用Matlab的百分位函数:

 cutoff = prctile(randomdata,10);