フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

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

1 回表示 (過去 30 日間)
SANKAR JYOTI NATH
SANKAR JYOTI NATH 2016 年 11 月 16 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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 =[]

回答 (1 件)

KSSV
KSSV 2016 年 11 月 16 日
編集済み: KSSV 2016 年 11 月 16 日
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

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by