Zuletzt bearbeitet von Jan S am 03.02.2012, 22:36, insgesamt einmal bearbeitet
matlabpfeife1
Gast
Beiträge: ---
Anmeldedatum: ---
Wohnort: ---
Version: ---
Verfasst am: 03.02.2012, 09:26
Titel:
hallo jan,
habe bis dahin eine lösung in folgender form gefunden:
Code:
fid = fopen('PS_TS30_ref.txt');
C = textscan(fid, '%s')% makes array from textfile
M = C{1,1}% C{1,1} contains all values in rows
for k=4:6:length(M), % from 4th row on every 6 rows untill length of M
Z{k,1} = M{k,1}% write only those rows in a new array Z, other cells are empty [] end
ZelleClean = Z(~cellfun('isempty', Z')); % delete empty cells from the array Z
ist das optimierbar? wie schaffe ich es jetzt in "ZelleClean" nur die wertenach dem doppelpunkt pro zeile auszugeben?
gruss und dank
fid = fopen('PS_TS30_ref.txt');
C = textscan(fid, '%s'); % makes array from textfile
M = C{1,1}; % C{1,1} contains all values in rows
Z = M(4:6:length(M));
Du kannst Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum antworten. Du kannst deine Beiträge in diesem Forum nicht bearbeiten. Du kannst deine Beiträge in diesem Forum nicht löschen. Du kannst an Umfragen in diesem Forum nicht mitmachen. Du kannst Dateien in diesem Forum posten Du kannst Dateien in diesem Forum herunterladen
MATLAB, Simulink, Stateflow, Handle Graphics, Real-Time Workshop, SimBiology, SimHydraulics, SimEvents, and xPC TargetBox are registered trademarks and The MathWorks, the L-shaped membrane logo, and Embedded MATLAB are trademarks of The MathWorks, Inc.