File Exchange

image thumbnail

makeStruct

version 1.0.0.0 (560 Bytes) by Matthew Kelly
Creates a struct from the variables that are passed to the function.

1 Download

Updated 13 Dec 2015

View License

% StructOutput = makeStruct(varargin)
%
% A struct is created with the property that each field corresponds to one
% of the arguments passed to this function.
%
% Example:
%
% R = makeStruct(a,b,c,d,e);
%
% R.a == a;
% R.b == b;
% R.c == c;
% R.d == d;
% R.e == e;
%
% Notes:
%
% An arbitrary number of inputs are allowed, but their names should be
% unique.
%

Cite As

Matthew Kelly (2019). makeStruct (https://www.mathworks.com/matlabcentral/fileexchange/54490-makestruct), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (0)

MATLAB Release Compatibility
Created with R2012a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired: Particle Swarm Optimization