Question: how to calculate confidence level in matlab?
Answer: x = randi(50, 1, 100); % Create Data.
SEM = std(x)/sqrt(length(x)); % Standard Error.
ts = tinv([0.025 0.975],length(x)-1); % T-Score.
CI = mean(x) + ts*SEM; % Confidence Intervals.