On Thu, Sep 13, 2012 at 9:22 AM, Laurent Hoeltgen
<address@hidden> wrote:
On 13/09/12 08:40, ionavideo wrote:
I'm learning Octave slowly.
In spite of days of searching on Google, I can't figure out why
octave won't take a simple file of hex data.
I tried making a data.txt, a simple one-column file, like this:
C2
27
4F
E
and in the main program wrote:
dummy = load('data.txt')
And no matter what I try, how I change things, I always get the error
"failed to read matrix from file."
I put quotes around each hex value -- doesn't matter. I don't understand how
to use fread,
and don't even know if that is what I am supposed to do.
I am very discouraged. Way behind in my online classes. There must be a
simple solution that I just
do not see.
--
View this message in context: http://octave.1599824.n4.nabble.com/Loading-hex-data-tp4644068.html
Sent from the Octave - General mailing list archive at Nabble.com.
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave
Hi,
load/save commands are usually used to read and write ".mat" files, which have a very specific format.. My suggestion would be to try the functions dlmread and dlmwrite. These functions read and write tabulated (e.g. matrix-like) data to standard text files. You can use the command "help dlmread" inside octave to learn more about the functions.
Regards,
Laurent