?? counterdemo.m
字號:
% COUNTERDEMO - Demo script for counter functionality% % COUNTERDEMO starts a demo for the counter functions%% AUTHOR : J鴊er Hanseg錼d %% $DATE : 20-Apr-2005 00:36:24 $ %% $Revision: 1.00 $ %% DEVELOPED : 7.0.4.365 (R14) Service Pack 2 %% FILENAME : counterdemo.m echo onmore on%Initialize a counter 'MyCounter' and return its current value:counterinit('MyCounter')%Increase the counter by onecounterinc('MyCounter');%Display the value of 'MyCountercounterval('MyCounter')%List the active counterscounterlist%Evaluate if the counter 'MyCounter2' existscounterexists('MyCounter2')%Create a counter 'MyCounter2'counterinit('MyCounter2');%Set the counter to the value 4counterset('MyCounter2', 4);%Increase the counter in a loopfor i = 1:5 counterinc('MyCounter'); disp(counterval('MyCounter'))end%List the current counters:counterlist%Get the value of 'MyCounter2'counterval('MyCounter2')%Clean upcounterdelete('MyCounter')counterdelete('MyCounter2');%Verify that the counters does not existcounterexists ('MyCounter')counterexists('MyCounter2')more offecho off% Created with NEWFCN.m by J鴊er Hanseg錼d % Contact...: jogerh@ifi.uio.no % $Log$ % ===== EOF ====== [counterdemo.m] ======
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -