このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。
dataset2table
データセット配列からテーブルへの変換
説明
例
77 種類のシリアルの栄養情報を含む標本データを読み込みます。
load cereal;
最初の 5 つのシリアルについて、カロリー、タンパク質、脂肪、名前データを含むデータセット配列を作成します。変数にラベルを付けます。
Calories = Calories(1:5);
Protein = Protein(1:5);
Fat = Fat(1:5);
Name = Name(1:5);
cereal = dataset(Calories,Protein,Fat,'ObsNames',Name)
cereal = 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
cereal.Properties.VarDescription = Variables(4:6,2);
データセット配列をテーブルに変換します。
t = dataset2table(cereal)
t=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
バージョン履歴
R2013b で導入
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- 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)