annotate toolboxes/MIRtoolbox1.3.2/MIRToolbox/nthoutput.m @ 0:cc4b1211e677 tip

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
rev   line source
Daniel@0 1 function varargout = nthoutput(orig,varargin)
Daniel@0 2
Daniel@0 3 nth.type = 'Integer';
Daniel@0 4 nth.default = 1;
Daniel@0 5 nth.position = 2;
Daniel@0 6 option.nth = nth;
Daniel@0 7 specif.option = option;
Daniel@0 8
Daniel@0 9 varargout = mirfunction(@nthoutput,orig,varargin,nargout,specif,@init,@main);
Daniel@0 10
Daniel@0 11
Daniel@0 12 function [x type] = init(x,option)
Daniel@0 13 type = mirtype(x);
Daniel@0 14 type = type{option.nth};
Daniel@0 15
Daniel@0 16
Daniel@0 17 function y = main(x,option,postoption)
Daniel@0 18 y = x{option.nth};
Daniel@0 19 %y = x{1}{option.nth};