How many .txt files to compile matlab remove the first line using vertcat a big shift matrix?

hello everyone! Many .txt files in the folder.Matlab him into a big one, including how to help me transfer matrix format. Write the following code into the file with the last two columns = NaN cut short part is going wrong.
---------- % % %-----Raindrop(R,t) close all; clear all; clc; A=zeros(1,28); col1 = cell(1); col2 = cell(1); col1{1} = char(zeros(1,10)); col2{1} = char(zeros(1,10)); files = dir('C:\myfolder\*.txt'); for k=1:length(files) newData1 = importdata(files(k).name); vars = fieldnames(newData1); for i = 1:length(vars) assignin('base', vars{i}, newData1.(vars{i})); end textt = newData1.textdata; A = vertcat(A, newData1.data); col1 = vertcat(col1, textt{:,1}); col2 = vertcat(col2, textt{:,2}); end A(1,:)=[]; -----------

1 Commento

Error using vertcat CAT arguments dimensions are not consistent.
Error in diplom_first (line 18) A = vertcat(A, newData1.data);

Accedi per commentare.

Risposte (0)

Tag

Richiesto:

il 27 Mar 2015

Commentato:

il 27 Mar 2015

Community Treasure Hunt

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

Start Hunting!

Translated by