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 !!