table2dataset
(非推奨) テーブルからデータセット配列への変換
dataset
データ型は推奨されません。異種混合データを処理するには、代わりに MATLAB® table
データ型を使用します。詳細は、MATLAB table
ドキュメンテーションを参照してください。
説明
例
テーブルからデータセット配列への変換
77 種類のシリアルの栄養情報を含む標本データを読み込みます。
load cereal;
最初の 5 つのシリアルのカロリー、タンパク質、脂肪、名前のデータを含むテーブルを作成します。変数にラベルを付けます。
Calories = Calories(1:5);
Protein = Protein(1:5);
Fat = Fat(1:5);
Name = Name(1:5);
cereal = table(Calories,Protein,Fat,'RowNames',Name)
cereal=5×3 table
Calories Protein Fat
________ _______ ___
100% Bran 70 4 1
100% Natural Bran 120 3 5
All-Bran 70 4 1
All-Bran with Extra Fiber 50 4 0
Almond Delight 110 2 2
テーブルをデータセット配列に変換します。
ds = table2dataset(cereal)
ds = Calories Protein Fat 100% Bran 70 4 1 100% Natural Bran 120 3 5 All-Bran 70 4 1 All-Bran with Extra Fiber 50 4 0 Almond Delight 110 2 2
入力引数
バージョン履歴
R2013b で導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)