フィルターのクリア

Operations with tables and matrix

3 ビュー (過去 30 日間)
Montserrat Vallcorba Martí
Montserrat Vallcorba Martí 2017 年 12 月 14 日
Hello,
I have three tables with some information and I want to finally obtain a 3D-matrix:
The 3 tables are:
First step: I want to include information from table2 in table 1
Second step: I want to create a 3D-matrix with information from new_table1 and table 3
Any suggestions?
Thank you!
Montse

回答 (1 件)

Akira Agata
Akira Agata 2017 年 12 月 16 日
I'm not sure why you want to make 3D matrix. By connecting all the tables using innerjoin, you can obtain a table which contains all the information you need, like:
table12 = innerjoin(table1,table2,'Keys','date');
table123 = innerjoin(table12,table3,'Keys','ind');
tableOut = table123(:,{'ind','dur','vm','value1','value2','value3'});
If you want to make 3D matrix for some reason, it's a piece of cake!
data3D = cat(3,tableOut{:,{'ind','dur','vm','value1'}},...
tableOut{:,{'ind','dur','vm','value2'}},...
tableOut{:,{'ind','dur','vm','value3'}});
  1 件のコメント
Montserrat Vallcorba Martí
Montserrat Vallcorba Martí 2017 年 12 月 19 日
Thank you!

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeStability Analysis についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by