Assuming you want to use the default options then just specify it as an empty matrix,
>> [x,p]=ode45('MathieuDamped',[0 1000],[1,0],[],a,b,q);
Also, I'd highly recommend you read up on function handles and why the cost function should be specified using them.
At a minimum you want
>> [x,p]=ode45(@MathieuDamped,[0 1000],[1,0],[],a,b,q);
Phil.