It appears that you are calling the function without an output assignment.
Call it as:
v = theFunction(x);
then:
v = v(1:15);
to keep only those elements you want.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!