view scripts/audio/@audiorecorder/subsref.m @ 19522:ee3ec3f02358

maint: moved @audiorecorder and @audioplayer folders inside the audio folder
author Vytautas Jančauskas <unaudio@gmail.com>
date Wed, 18 Sep 2013 00:16:28 +0300
parents scripts/@audiorecorder/subsref.m@e1f98e402a7e
children 8bb399569393
line wrap: on
line source

function value = subsref(recorder, idx)
  if (isempty (idx))
    error ("audiorecorder: missing index");
  endif
  if (strcmp(idx(1).type, "."))
    field = idx.subs;
    value = get(recorder, field);
  else
    error ("audiorecorder: invalid subscript file")
  endif
endfunction