How I can separate the data points by line?
5 ビュー (過去 30 日間)
古いコメントを表示
I have made this cross plot between resistivity and porosity and color-coded by gas hydrate saturation. I need to separate the data points with a hydrate saturation of less than 20% by line.
1 件のコメント
採用された回答
Matt J
2022 年 7 月 3 日
編集済み: Matt J
2022 年 7 月 3 日
%synthetic data
N=500;
Resistivity=rand(N,1);
Porosity=rand(N,1);
Saturation=vecnorm([Porosity,Resistivity],2,2);
%classify
labels=Saturation<0.2;
mdl=fitclinear([Porosity,Resistivity],labels);
%plot
scatter(Porosity,Resistivity,50, Saturation,'filled'); colormap cool; colorbar
ax=axis;
hold on;
fimplicit(@(x,y)x*mdl.Beta(1)+y*mdl.Beta(2)-mdl.Bias,'LineWidth',3,'Color','k');
hold off
axis(ax*1.2-0.1)
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Distribution Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!