subsasgn.m

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

M
43
字号
function A = subsasgn(A,S,B)% subscript assignment:%% A(S)=B% $Id: subsasgn.m 80 2005-08-16 10:23:06Z mairas $switch S(1).type case '.'  switch S(1).subs   case 't'    if length(S)>1      error('Individual time index manipulation not supported.');    end    tim = time(B);    A=set(A,'time',tim);   case 'time'    if length(S)>1      error('Individual time index manipulation not supported.');    end    A=set(A,'time',B);   case 's'    if length(S)>1      s = A.s;      s(S(2).subs{:})=B;      A.s=s;    else      A.s=B;    end   case 'fs'    A=set(A,'fs',B);  end case '()'  s = A.s;  s(S(1).subs{:})=B;  if length(s)>A.time.num    t=set(A.time,'num',length(s));    A=set(A,'time',t);  end  A.s=s;end

⌨️ 快捷键说明

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