stringnum.m

来自「Goertzel算法是DTMF信号检测的核心」· M 代码 · 共 28 行

M
28
字号
function [InputArray,i] = StringNum(InputArray,Num,i);
%
%
%        Function to store the numbers in a array upto a max of 8 numbers
%                 and return the array for display purposes
%
%  Author: Pranam Janney           Date: 15/05/04     Time: 17:50          
%  Email: pranamjanney@yahoo.com
%
%  Usage:
%          D = StringNum(Num);
% Inputs:
%         Num = number that should be stored
%           i = number of times this function has been called
%         InputArray = stored array of numbers
% Outputs:
%         D = array of 8 numbers
%         i = number of times this function has been called
%         InputArray = stored array of numbers
%
if ( i <= 8)       % By changing this number the dialled numbers could be increased
    InputArray(i) = Num;
else
    i = 1;
    InputArray = ' ';
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?