MATLAB Answers

Plot median values in a bin (binned plot)

2 views (last 30 days)
fid = fopen('B0B1_Daytime.txt');
datacell =textscan(fid,'%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f', 'collectoutput', true);
M=datacell{1,1};
x = (M(:,2));
y = (M(:,1));
z = (M(:,9));
scatter(x,y,2,z,'s','filled')
This is the code that i have written here for the plot of x,y and z as surface plot. as it is attached here.
I want this plot with binned value and each bin should has median values in a bin.
  5 Comments

Sign in to comment.

Accepted Answer

Rik
Rik on 29 Aug 2021

You can try gridbin.

I haven't used it myself, but it seems to do what you need.

  3 Comments

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by