Is there a function that can make new categorical array by sorting numeric data from a table?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Cichlid Tracker
el 26 de Nov. de 2018
Comentada: Peter Perkins
el 11 de Dic. de 2018
I am tracking fish location in a tank over time, and want to show graphically a box plot of the fish's x coordinate.
My data goes for a full hour, though, and I need to split that time up into around 10 smaller segments so I can see the average x coordinate of the fish during each time span. I've looked at sort, ordinals, discretize, histcounts, and more and I can't get any of them to do this. They can sort the data into bins by time but don't return the sections in any way that I can then graph. Any ideas what functions I should try?
0 comentarios
Respuesta aceptada
Peter Perkins
el 27 de Nov. de 2018
I guess your x coordinate is just numeric values. It seems like putting your raw data into a timetable would be the way to go. Then use retime to compute averages within each time bin, and plot tt.X vs. tt.Time (or whatever you called the variables).
2 comentarios
Peter Perkins
el 11 de Dic. de 2018
Well, you can do anything, and I can think of several ways to retain the raw data for each time bin. But if you want to make boxplots usig the boxplot function in Statistics and Machine Learning Toolbox, then I think you want to keep the original tietable and just add a bin number as a new variable. I think discretize is the best way to do that. Then pass the var you want to make a boxplot of, along with the bin numbers, into boxplot.
Más respuestas (0)
Ver también
Categorías
Más información sobre Data Distribution Plots en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!