A quick search on the file exchange produces several codes for exactly the same Fresnel integrals that are far more trustworthy. I'd recommend the following implementation as the best by far:
That alternative code is well coded, well documented, uses a series solution for small values of x, etc.
On the other hand, the current submission is poorly done, has no useful help, and uses quadl to solve the problem for all arguments (a terrible way to do it.) This submission is poor in every aspect of the word. And, yes, starting a matlab script with
clc;
clear all;
is the most obvious mark of a complete matlab novice who has no idea of how to provide a useful tool that others will want to use.