function setbarscale(zr) %SETBARSCALE Set the colorbar scale. % % SETBARSCALE(R) % % R is the colorbar range. % % % Claudio 25 Jan, 1995. % % % Copyright (c) 1995 by Claudio Rivetti and Mark Young % claudio@alice.uoregon.edu, mark@alice.uoregon.edu % global Handlebar if isempty(zr) str1=''; str2=''; else if (abs(zr(1))>=0.01 & abs(zr(1))<=9999 & abs(zr(2))>=0.01 & abs(zr(2))<=9999) | zr(1)==0 | zr(2)==0 str1= sprintf('%.2f', round(zr(1)*100)/100); str2= sprintf('%.2f', round(zr(2)*100)/100); else str1= sprintf('%.2e', zr(1)); str2= sprintf('%.2e', zr(2)); end end ztxt=get(Handlebar, 'Userdata'); set(ztxt(1), 'string', str1); set(ztxt(2), 'string', str2); return