% updatel.m % % n is the integer such that n>=1 if (n<0), n=1; end % l is the integer such that 0<=ln-1), l=n-1; end; % Activate Control figure figure(F2); % Setting the sliders labels and positions to n and l set(n_text,'string',[ 'n=' num2str(n)]); drawnow; set(l_text,'string',[ 'l=' num2str(l)]); drawnow; set(n_slide,'value',n);drawnow; set(l_slide,'value',l); drawnow; figure(F1); % Recalculate data only if it is necessary if l ~= lold figure(F1); set(mess1,'visible','on');drawnow; expr = radhyd(n,l,'x');lold=l; figure(F1); set(mess1,'visible','off');drawnow; % Make the full function comnd=[ 'y=' expr ';']; % Change the ordinary matrix operations into array operations comnd=strrep(comnd,'^','.^'); comnd=strrep(comnd,'*','.*'); comnd=strrep(comnd,'/','./'); end eval(comnd); if Rmulv==-1 figure(F1); plot(x,y,[0 range], [0 0]); else figure(F1); plot(x,x.*y,[0 range], [0 0]); end