image thumbnail
from A Multiple Units Converter and a Calculator by Hong Zhang
It contains a units converter and a caculator using pure m files

dwhs.m
h=figure('menubar','none',...
    'position',[200 200 540 450],...
    'name','Unit Conversion by CaoZisheng, published on: www.iLoveMatlab.cn');
hp= uipanel('Title','Unit Conversion ','FontSize',12,...
    'Position',[0 0 1 1]);

hpop=uicontrol('units','points','style','popup','FontSize',12,...
    'string','Length|Area|Volume|Weight|Force|Power|Pressure|Temperature|Computerunit',...
    'position',[280 280 100 25]);
set(hpop,'value',1);
length2;
set(hpop,'callback',...
    ['hpop_val=get(hpop,''value'');',...
    'if hpop_val==1',...
    'length2;',...
    'elseif hpop_val==2',...
    'area2;',...
    'elseif hpop_val==3',...
    'volume2;',...
    'elseif hpop_val==4',...
    'weight2;',...    
    'elseif hpop_val==5',...
    'force2;',...
    'elseif hpop_val==6',...
    'power2;',...
    'elseif hpop_val==7',...
    'pressure2;',...
    'elseif hpop_val==8',...
    'temperature2;',...
    'elseif hpop_val==9',...
    'computerunit2;',...
    'end']);

hr1=uicontrol(gcf,'units','points',...
    'style','pushbutton',...
    'string','Clear',...
    'FontSize',12,...
    'position',[80 40 60 25],...
    'callback',['for n=1:21,',...
    'set(a(n),''string'','''');,',...
    'end',...
    ]);
hr2=uicontrol(gcf,'units','points',...
    'style','pushbutton',...
    'string','Close',...
    'FontSize',12,...
    'position',[250 40 60 25],...
    'callback','close');
hr3=uicontrol(gcf,'units','points',...
    'style','pushbutton',...
    'string','calculator',...
    'FontSize',12,...
    'position',[165 40 60 25],...
    'callback','jishuanqi');
hr4=uicontrol(gcf,'units','points',...
    'style','text',...
    'string','Developed by CaoZisheng, published on: www.iLoveMatlab.cn',...
    'FontSize',10,...
    'position',[40 20 320 15]);

Contact us