set.m

来自「基于matlab的面向对象的信号处理类库。主要应用于音频、语音信号的一些处理。内」· M 代码 · 共 34 行

M
34
字号
function a = set(a,varargin)% SET Set signal properties and return the updated object%%    A=SET(A,prop1,val1,prop2,val2,...) sets properties to their%    respective values. Allowed properties are:%%      time%      s%      fs%      valid% $Id: set.m 53 2005-01-05 11:17:56Z mairas $property_argin = varargin;while length(property_argin) >= 2,  prop = property_argin{1};  val = property_argin{2};  property_argin = property_argin(3:end);  switch prop   case 'time'    a.time = val;   case 's'    a.s = val;   case 'fs'    a.time = set(a.time,'fs',val);   case 'valid'    a.valid = val;   case 'begin'    a.time = set(a.time,'begin',val);           otherwise    error(['invalid property: ' prop])  endend

⌨️ 快捷键说明

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