Good catch Elad. You definitely see the differences when you click on the whole picture better. Elad is correct that odd things can happen on nodes connected to junctions with no demand during periods where the flows through connecting pipes are zero. To calculate the junction concentration EPANET uses a weighted average based on the flows in all connected pipes, but if the flows in the pipes are near zero then even pipes with no flow can contribute to the junction concentration due to the numerical rounding error of pipes with flows all less than 2 decimal places. This can at times create short term spikes in the water age to occur in the junction water age to sometimes occur.
EPANET can also at times calculate unusual water age values on the suction node of pumps that are not running as well (It can make those have a water age of zero). Without seeing your system it’s difficult to tell if those are potentially contributing. These are at least two locations I know of where unusual water age results can occur in EPANET
However, I am not familiar with using Matlab and EPANET to tell you why there might be differences in the two methods as I have never used Matlab in that way.
The one other thing I would check is to make sure your water quality timestep is always at least 1/10th of your hydraulic timestep and that your hydraulic accuracy and water quality accuracy are generally not higher than 0.01 as that can begin to introduce error.
We have also noticed that to get the most accurate water age results you may need to reduce your hydraulic timestep to less than 1 hour. I always recommend that people check 1 hour - 30 minutes, 15 minutes, 10 minutes, and 5 minutes as the hydraulic timestep (in that order) and when the WQ results between the two runs remains within a reasonable tolerance, then use the larger of the two hydraulic timesteps in the comparison. In certain models this can impact results up to 10-20% or more by improving the pipe flow estimations the software uses to estimate transport times. This is often most significant if your model has multiple tanks near each other which can cause difficulties in the EPANET hydraulic solution and thus the water age.
Those are fairly easy things to check in your results to make sure that is not causing difficulties.