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 suc ceedin


From: THOMAS Paul Richard
Subject: RE: I am a newbie, trying to do something very simple and not suc ceeding
Date: Wed, 12 Nov 2003 10:49:09 +0100

Jeff,


That is because the brace, unlike C, defines a cell array.  To define a
vector vector, you need to use square brackets:

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

The semi-colon suppresses echoing of the input.  Exchange commas for
semi-colons within the square brackets if you want a column vector.

I suggest that you trawl the web for a beginners manual on Matlab, since
Octave is not far different, and work from that.  The Octave online help is
not bad either.

eg
http://www.csb.yale.edu/userguides/datamanip/matlab/help/techdoc/basics/gett
ing1.html

Regards

Paul Thomas

-----Message d'origine-----
De : Jeff Silverman [mailto:address@hidden
Envoyé : mercredi 12 novembre 2003 10:34
À : address@hidden
Objet : I am a newbie, trying to do something very simple and not
succeeding


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'

I tried wrapping this in a loop and it still gives me the error.

I am sure I am doing something stupidly wrong, but I just don't see it.


Many thanks,


jeff


-- 
Jeff Silverman
jeffs at commercialventvac dot com

Know perl: Know freedom.
No perl: no freedom.
The right to open source software is the right to be free.



-------------------------------------------------------------
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
-------------------------------------------------------------

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.536 / Virus Database: 331 - Release Date: 03/11/03
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.536 / Virus Database: 331 - Release Date: 03/11/03
 



-------------------------------------------------------------
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]