cell2vars: Transform cell to vars

cell2vars: Transform cell's columns' to variables in workplace
ダウンロード: 334
更新 2012/10/8

ライセンスの表示

% 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
%=============================================

引用

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

MATLAB リリースの互換性
作成: R2011b
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersStructures についてさらに検索

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
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