I assume you're intentionally avoiding the std() function. However, your calculation of standard deviation is incorrect.
should be
Secondly, your critical value is only correct for a standard normal distribution. Matlab's calculation of the critical value correctly multiplies by the standard error using
crit = tinv(1 - alpha, df) .* ser;
Lastly and most importantly, the confidence interval computed with this method for your data is meaningless or, even worse, misleading. This method of computing a CI assumes a normal distribution and your data are clearly nowhere close to being normally distributed.
I recommend using bootstrap confidence intervals which do not carry a distribution assumption.
This demo estimates the median (since the mean is heavily influenced by the tails in non-normal distributions). It computes the median 1000s times with bootstrapped samples and returns the middle 95% of the distribution of medians thanks to the central limit theorem.
ci = bootci(1000, {@median, ValuesTable}, 'type', 'per', 'alpha', .05);
histogram(ValuesTable,20)
h(1) = xline(ci(1), 'r-', 'LineWidth', 2, 'DisplayName','LowerCI');
h(2) = xline(ci(2), 'm-', 'LineWidth', 2, 'DisplayName', 'UpperCI');
h(3) = xline(median(ValuesTable), 'k--', 'DisplayName','median');

Lastly, let's compare the 95% CIs beformed by ttest and by bootstrapping on your data. The black dashed line is the mean of the population. The red lines are the 95% CI computed by bootstrapping. The dashed black lines are 95% CI computed by ttest. The ttest CIs are similar to the bootstrap CIs but shifted leftward. Since the ttest CIs are computed using std and since std are affected by outliers which appear as a rightward tail, the ttest CIs are not as reliable as the bootstrap results. In fact, the bootstrap results using the percentile method will always be either as reliable (in the case of normally distributed data) or more reliable (in all other cases) than using methods that require normal distributions.