Clear Filters
Clear Filters

What's the best way to visualize position/zscore over multiple subjects?

11 views (last 30 days)
I've been struggling to find a way to visualize the correlation between zscore (zscore.csv) and position (xcord.csv) from electrophysiological recordings. I only one dimension of position, but because the recordings were done over time I end up with 17940x2 per animal.
I tried to average z-scores into a new set of bins (new_bins.csv) that spams all the positions of all the animals, but don't know if that would make a good visualization. Also tried to plot all the values as average of x values and average of z scores, but because there's a clear preferance of side by the animal, I end up with too many datapoints on one end.
Is there a way to average the values of zscores respective to the values for x that fall into the new bins? Or is there a better way to visualize this altogether? The best example I found so far was panel D of this figure, but I don't think it made it to their github.

Answers (1)

Cris LaPierre
Cris LaPierre on 16 Jun 2024
Z = readmatrix('zscore.csv');
x = readmatrix('xcord.csv');
nb = readmatrix('newbins.csv');
B = groupsummary(Z(:),x(:),nb,'mean');
plot(nb,B)

Products


Release

R2023a

Community Treasure Hunt

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

Start Hunting!