Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

how to delete 1st row of a matrix....help

1 visualización (últimos 30 días)
SANKAR JYOTI NATH
SANKAR JYOTI NATH el 16 de Nov. de 2016
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
my txt file is
5-Mar-20150000
2.32611e+006 90 7.07107
2.32611e+006 99 7.61577
2.32611e+006 108 7.81025
2.32611e+006 141 7.07107
2.32611e+006 150 7.61577
2.32611e+006 159 7.81025
2.32611e+006 192 7.07107
2.32611e+006 201 7.61577
2.32611e+006 210 7.81025
2.32611e+006 243 7.07107
2.32611e+006 252 7.61577
2.32611e+006 261 7.81025
2.32611e+006 294 7.07107
2.32611e+006 303 7.61577
2.32611e+006 312 7.81025
2.32611e+006 321 7.21110
2.32611e+006 354 7.61577
2.32611e+006 363 7.81025
2.32611e+006 372 7.21110
2.32611e+006 405 7.28011
2.32611e+006 414 7.81025
2.32611e+006 423 7.21110
2.32611e+006 447 7.00000
2.32611e+006 456 7.28011
2.32611e+006 465 7.21110
2.32611e+006 474 7.21110
2.32611e+006 498 7.00000
i want to delete the date of the file which is in the 1st row......i have more than 300 files as this pattern
i am trying with this code:
yourFolder ='C:\Users\Parag\Desktop\open\march15\05-03-15';
ListOfFilenames = {};
dirListing = dir([yourFolder '/*.txt*']);
for Index = 1:length(dirListing)
baseFileName = dirListing(Index).name;
ListOfFilenames = [ListOfFilenames baseFileName]; end
set(handles.Display,'string',ListOfFilenames);
Selected = get(handles.Display, 'Value');
ListOfFileNames = get(handles.Display, 'string');
baseFileName = strcat(cell2mat(ListOfFileNames(Selected)));
fof2=fullfile(yourFolder, baseFileName);
data=importdata(fof2)
data1 = data(1,:)
data1 =[]

Respuestas (1)

KSSV
KSSV el 16 de Nov. de 2016
Editada: KSSV el 16 de Nov. de 2016
dinfo = dir('*.txt'); % get all text files
nfiles = length(dinfo) ; % totla number of text files
for K = 1:nfiles
filename = dinfo(K).name; %just the name
data = importdata(filename); %load just this file
%%do wjhat you want %%
num_data = k.data ; % picks only numbers data.
end

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by