Counting using Statistics tools

2 ビュー (過去 30 日間)
Afua Amoako Dadey
Afua Amoako Dadey 2020 年 7 月 11 日
回答済み: Adam Danz 2020 年 7 月 11 日
Hello dear people please can anyone help me write a code to count these points in each quarter of the graph attached

採用された回答

Adam Danz
Adam Danz 2020 年 7 月 11 日
Presumably you already have the (x,y) coordinates if you've plotted the data.
You just need to use indexing (the main superpower of Matlab) to determine which points are in which quadrants.
For example,
centerPoint_x = min(xlim) + range(xlim)/2;
centerPoint_y = % Same thing as above but with ylim
quad1 = x >= centerPoint_x & y >= centerPoint_y;
quad2 = x < centerPOint_x & y >= centerPoint_y;
quad3 = % fill in....
quad4 = % file in....
% Points that are in Quad1 are
x(quad1), y(quad1)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMathematics についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by