ita_struct2arguments.m 1.28 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
function varargout = ita_struct2arguments(varargin)
%ITA_STRUCT2ARGUMENTS - Convert argument structure back to cellArray
%
%  Syntax: cellArray = ita_struct2arguments(sArgs)
%
%
% Author: Roman Scharrer -- Email: rsc@akustik.rwth-aachen.de
% Created:  23-Feb-2009 

% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved. 
% You can find the license for this m-file in the license.txt file in the ITA-Toolbox folder. 
% </ITA-Toolbox>


%% Get ITA Toolbox preferences and Function String
verboseMode  = ita_preferences('verboseMode');  %#ok<NASGU> Use to show additional information for the user
thisFuncStr  = [upper(mfilename) ':'];     %#ok<NASGU> Use to show warnings or infos in this functions

%% Initialization and Input Parsing
narginchk(1,1);
varargin{1} = struct(varargin{1}); %pdi: bugfix for new itaMeausrementSetup class
sArgs        = struct('pos1_data','struct');
[data,sArgs] = ita_parse_arguments(sArgs,varargin); 

%% +++Body - Your Code here+++ 'result' is an audioObj and is given back 


f = fieldnames(data);
c = struct2cell(data);

Result = [f c].';
Result = reshape(Result,numel(Result),1);


%% Find output parameters
if nargout == 0 %User has not specified a variable
    % Do plotting?
    
else
    % Write Data
    varargout(1) = {Result}; 
end

%end function
end