deployFields

deploys all fields of a structure as variables
13 download
Aggiornato 28 ott 2018

Visualizza la licenza

%DEPLOYFIELDS deploys all fields of the structure 'details', as variables,
% inside the caller's workspace.
%
%Syntax:
%DEPLOYFIELDS(details);
%DEPLOYFIELDS('structVarName');
%DEPLOYFIELDS;
%
%DEPLOYFIELDS accepts either a structure variable, or a name
% of a structure variable. The latter is faster because it doesn't involve
% copying the structure.
%
%If no argument is passed, DEPLOYFIELDS searches for the default structure
%variable name: 'details'.

Most common usage :

function [] = foo(details)
%default values:
a=1;
b=2;

deployfields; %deploy details. if details has fields .a .b, they will overwrite the default values.
...
....
.....

Cita come

Elimelech Schreiber (2024). deployFields (https://www.mathworks.com/matlabcentral/fileexchange/69247-deployfields), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2018b
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Structures in Help Center e MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versione Pubblicato Note della release
1.0.1

just added intended usage example

1.0.0