cell2vars: Transform cell to vars

cell2vars: Transform cell's columns' to variables in workplace
334 descargas
Actualizado 8 oct 2012

Ver licencia

% PURPOSE: Convert the cell's columns' to variables in matlab workspace
% -----------------------------------------------------------------------------
% SYNTAX:
% (1) cell2vars(cellvar)
% (2) cell2vars(cellvar, newvarname)
% -----------------------------------------------------------------------------
% OUTPUT:
% (1) each column of the cell is been transform to a variable in matlab
% workspace
% -----------------------------------------------------------------------
% INPUT:
% (1) cellvar: NxM --->a cell containing M columns. Each column include
% a head and its body.
% (2) newvarname: 1xM ---> M string as new head for the column.
% NB: no string can be include in the file.

% -----------------------------------------------------------------------
% LIBRARY:
% -----------------------------------------------------------------------
% SEE ALSO: vars2cell,
% -----------------------------------------------------------------------
% REFERENCE: assigni, eval
% -----------------------------------------------------------------------
% written by:
% Lin Renwen
% <linrenwen@gmail.com>

% Version 1.0 [2012-6-27 20:29:25]

%=============================================
% EXAMPLE:
% INPUT:
% > A = {'name','grade'; 1,56; 2,78; NaN,90};
% > cell2vars(A);
% > name
% name =
% 1
% 2
% NaN
%
% > grade
% grade =
% 56
% 78
% 90
% % END OF EXAMPLE
%=============================================

Citar como

Renwen Lin (2024). cell2vars: Transform cell to vars (https://www.mathworks.com/matlabcentral/fileexchange/37290-cell2vars-transform-cell-to-vars), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2011b
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Structures en Help Center y MATLAB Answers.

Community Treasure Hunt

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

Start Hunting!
Versión Publicado Notas de la versión
1.2.0.0

Revise the example; thanks so much! Simon

1.1.0.0

Adjust according to Jan Simon's suggestion. Jan thanks so much!

1.0.0.0