MATLAB: Error when calling function from GUI

abnormalcallingerrorfunctionweird

This happens when i assigned calling of the function from a gui. It operated fine if i just simply call the function in command line.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case 'Correlation',
disp(sCr(i,j))
disp(CrVa)
k=sCr(i,j)-CrVa
the computation gives:
0.5616
0.9988
k =
-47.4384 -45.4384 -56.4384 -56.4384 -55.4384 -55.4384
0.5491
0.9988
k =
-47.4509 -45.4509 -56.4509 -56.4509 -55.4509 -55.4509
%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Best Answer

Ok, i've found the error. Values stored as string won't be automatically treated as numbers sometimes.
0.9988 --> 6 ascii values hence when i use a number deduct string 0.9988, array of values appeared.
Thanks and case closed. Sorry for wasting time of those who tried to help.
Thanks alot.