help-octave
[Top][All Lists]
Advanced

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

Re: Loading .dat file


From: fork
Subject: Re: Loading .dat file
Date: Thu, 24 Jun 2010 17:32:02 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

dirac <ma00101 <at> surrey.ac.uk> writes:
  
> I have just downlaoded Octave and am pretty new to it. 

Welcome -- Octave rocks!

> I am literally typing:
> dlmread(CTL0125B_B34C11_325_HP_2to40mA_MA_Retrial2.dat) in to the program,
> but I recieve an error saying:'CTL0125B_B34C11_325_HP_2to40mA_MA_Retrial2'
> unidefined near line 20 column 9

Octave is looking for a variable named "CTL[etc]" and trying to evaluate it; no
such variable exists so it throws an error.

You want:

my_matrix = dlmread('CTL0125B_B34C11_325_HP_2to40mA_MA_Retrial2.dat')

Note the quote marks that set off a string rather than a variable (a string
refering to the filename).  Note also the "my_matrix = " on the left side -- you
need to assign the results of dlmread somewhere.

Now you can use my_matrix to do analysis with (assuming you didn't need to
specify custom delimiters in dlmread).




reply via email to

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