check the condition and assign discrete values
1 回表示 (過去 30 日間)
古いコメントを表示
i have converted one dataset into four groups.say my datavalues are in between 0 to 1.
Then i seperated those values as <0.25 ,<0.5 ,<0.75,<1
now i want to assign 0.25 group as value 0, 0.5 group as 1 0.75 group as 2 1 group as 3
can anybody help in this?
0 件のコメント
採用された回答
Azzi Abdelmalek
2013 年 11 月 4 日
編集済み: Azzi Abdelmalek
2013 年 11 月 4 日
x=rand(1,100)
[idx,idx]=histc(x,[0.25 0.5 0.75 1])
for k=1:4
groupe{k}=x(idx==k-1)
end
その他の回答 (1 件)
Image Analyst
2013 年 11 月 4 日
If you have the Image Processing Toolbox, you could use imquantize().
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Particle & Nuclear Physics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!