📄 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 + -