MATLAB Answers

How to generate 3D Trajectory Heatmap?

17 views (last 30 days)
Jack.E
Jack.E on 7 Nov 2020
Answered: Amrtanshu Raj on 20 Apr 2021
Attached is the data describing a particles position in x,y, and z (in ums) with time (msec). What is the best way to plot how often the particle visits each voxel (user defined, lets say 0.1umx0.1umx0.1um) to genreate a 'heatmap'? I know the Navigation toolbox is setup to plot occupancy but I have no experince with this toolbox and dont know if it will be able to do what I want. Any suggestion would be appreciated, thanks.

Answers (1)

Amrtanshu Raj
Amrtanshu Raj on 20 Apr 2021
Hi,
You can achieve the required workflow using occupancyMap3D. You can initialize the map initially with cell size as per your required voxel size and then update the occupancy value of the voxels as per the x,y and z data in traj.mat. You can track the occupancy values after every addition or at the end. The Occupancy value will tell how many times the particle has visited a particular voxel or cell.
Hope this helps !!

Community Treasure Hunt

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

Start Hunting!