help-octave
[Top][All Lists]
Advanced

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

Re: I am a newbie, trying to do something very simple and not succeeding


From: Miquel Cabanas
Subject: Re: I am a newbie, trying to do something very simple and not succeeding
Date: Wed, 12 Nov 2003 10:54:42 +0100
User-agent: Mutt/1.3.28i

hi,

On Wed, Nov 12, 2003 at 01:34:23AM -0800, Jeff Silverman wrote:
> I am trying to define a vector and take the natural logarithm of each 
> element in the vector.
> 
> x = { 1,2,5,10,20,50,80,90,95,98,99}
> 
> that works, but then I try
> 
> y = log(x)
> 
> I get an error message
> 
> error: mapper: wrong type argument: 'cell'

that's because you have created a cell structure, which is not
a vector (neither a matrix).

Try,

x = [ 1,2,5,10,20,50,80,90,95,98,99]

and then proceed as above to calculate y.

Also, I recommend you to read the manual to become more familiar
with the syntaxis and capabilities of Octave. I'm pretty sure you
will enjoy reading it and will greatly benefit from doing so.

Miquel

-- 
Miquel E Cabanas ------------------------------------------------------
SeRMN, Universitat Autonoma de Barcelona (address@hidden)
------------------------------------------o-oo--ooo---ooo--oo-o--------




-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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