help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Write a cell array to a textfile


From: Alasdair McAndrew
Subject: Write a cell array to a textfile
Date: Sat, 22 Jan 2011 09:52:08 +1100

This is a bit of a dumb question, I think, but in spite of using Matlab (and Octave) for years, I actually have very little experience in low level file handling.  Anyway, I have a file containing text and numerical data which I can read into a cell array using textread.  But there doesn't seem to be a comparable "textwrite" to write the amended cell array back to another text file.

So - what is the most foolproof way of writing a cell array, containing text and numerical data, to a text file? 

For example, suppose that every row in the array contains a first and last name, along with age, height (in metres) and weight (in kilograms), like

Leaonhard, Euler, 74, 1.6, 72

So each row in the array contains five elements: two string values (the names), one integer value, and two floating point values.

Thanks,
Alasdair

--
Blog: http://amca01.wordpress.com
Web:  http://bit.ly/Alasdair
Facebook: http://www.facebook.com/alasdair.mcandrew

reply via email to

[Prev in Thread] Current Thread [Next in Thread]