複数のtableデータの結合

33 visualizaciones (últimos 30 días)
masatake
masatake el 6 de Jul. de 2022
Comentada: masatake el 6 de Jul. de 2022
複数のcsvファイルを結合する際に
事前割り当ての警告を回避するコードの書き方があれば教えていただきたいです
(あらかじめ全ファイルの総行数を把握する方法等)
行数は同一ではないものとしています
よろしくお願いします
fn=dir('*.csv')
l=length(fn)
T=[]
for i=1:l
Tn = readtable(fn(l).name);
T=[T ;Tn]%事前割り当てがないため警告
end

Respuesta aceptada

Hernia Baby
Hernia Baby el 6 de Jul. de 2022
データストアで読み込み、tall配列を使用してはいかがでしょうか?
  2 comentarios
Hernia Baby
Hernia Baby el 6 de Jul. de 2022
データ ストア入門はこちらです。
masatake
masatake el 6 de Jul. de 2022
回答ありがとうございます
tall配列。。初めて知りました
記述もすっきりしました、ありがとうございます

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!