cutspace.m (322B)
1 % cutspace.m y=cutspace(x,front,back) 2 % 3 % Cuts space from the front (if front==1) and/or back (if back==1) of a string. 4 % actually, the front & back part is not yet implemented -- cuts both. 5 6 function x=cutspace(x,front,back); 7 8 x=[' ' x ' ']; 9 10 N=length(x); 11 k=find(x~=' '); 12 T=length(k); 13 x([1:(k(1)-1) (k(T)+1):N])=[];