From: Cesare on 17 Jan 2010 04:52 Hi! the basic way is to use fopen, fprintf and fclose. You can even write m-files this way. I got to your post cause I was looking for a function that did it automatically for any structure, but don't know whether it exists. Best, Cesare "Tiger Smith" <loscleaa(a)gmail.com> wrote in message <hd27rl$rc4$1(a)fred.mathworks.com>... > Hi there, > I have a struct a which has fields name, time,bytes,isdir. > And a.name are cells like > 'data-001-05-26-09.dat > data-002-00589.dat > data-3-005-9.dat...........' > > > I want to write a.name to a .txt file. > > Does anybody has some suggestion? > Thank you.
From: Oleg Komarov on 17 Jan 2010 09:16 "Tiger Smith" > Hi there, > I have a struct a which has fields name, time,bytes,isdir. > And a.name are cells like > 'data-001-05-26-09.dat > data-002-00589.dat > data-3-005-9.dat...........' > > > I want to write a.name to a .txt file. > > Does anybody has some suggestion? > Thank you. Some basic struct manipulation: myStruct(1).name = 'John'; myStruct(2).name = 'Matt'; myStruct(3).name = 'Alexander'; Names = strvcat(myStruct.name) Names = John Matt Alexander The same goes for the other fields. theTimes = [myStruct.time]; Cesare indicated you some fcn for writing your data to .txt. Oleg
|
Pages: 1 Prev: System Dynamics and Response, S. Graham Kelly Next: infinite product |