How to plot Data based fifth column
1 次查看(过去 30 天)
显示 更早的评论
Hello, i hope you are doing well. I have the dataset which have five column , I want to plot first two column values based on fifth column value, which basically Number of classses 0 or 1
2 个评论
Dyuman Joshi
2022-12-14
Something like this?
y=load('Data.mat').pdw;
y0=y(:,5)==0;
y1=y(:,5)==1;
plot(y(y0,1),y(y0,2))
hold on
plot(y(y1,1),y(y1,2))
legend({'Corresponding to Zero', 'Corresponding to One'})
There are some repetetive values in the data, as seen by the graph.
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!