view getVarname.m @ 874:95993ad2bd70

Add function to deal the fields of a struct to variables
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 01 Nov 2018 14:10:02 +0100
parents 289fd8b1635c
children
line wrap: on
line source

function names = getVarname(varargin)
    names = cell(size(varargin));

    for i = 1:numel(varargin)
        names{i} = inputname(i);
    end
end