How to find a value in matrix column and extract the another column equal to that value?
1 次查看(过去 30 天)
显示 更早的评论

want to find a value from c column(example 35) and want to plot between data in column a and d equal to the value(example 35)
0 个评论
采纳的回答
Akira Agata
2017-7-16
I think the code will be like:
% Sample array
data = randi([30,40],100,3);
% Index where column-2 == 35
idx = data(:,2) == 35;
% Plot column-1 and column-3 under the condition that column-2 == 35
plot(data(idx,1),data(idx,3),'o');
3 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Performance 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!