help-octave
[Top][All Lists]
Advanced

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

Re: implementing num2cell?


From: John W. Eaton
Subject: Re: implementing num2cell?
Date: Mon, 24 Oct 2005 12:38:29 -0400

On 24-Oct-2005, David Bateman wrote:

| address@hidden wrote:
| 
| >Hi,
| >
| >I've been trying to get matrix2latex to work with Octave & found David
| >Bateman's num2cell -- but I'm running into problems with that. I'm
| >wondering if I introduced num2cell into the system incorrectly, since I
| >copied & pasted his C text into pico & wrote num2cell.m from that. The
| >errors are parsing errors (somewhat corrected by adding %'s) and syntax
| >errors (after sig).
| >
| >The current num2cell _is_ in an appropriate path directory, but should I
| >try deleting it and "reinstalling" some other way?
| >
| >Thanks
| >
| >Arwen
| >
| >----------------Error message:---------------
| >parse error near line 17 of file
| >/sw/share/octave/2.1.71/site/m/octave-forge/cell/num2cell.m
| >
| >  syntax error
| >
| >  
| >
| >>>>DEFUN_DLD (num2cell, args, ,
| >>>>        
| >>>>
| >                               ^
| >
| >parse error near line 25 of file
| >/sw/share/octave/2.1.71/site/m/octave-forge/cell/num2cell.m
| >
| >  syntax error
| >
| >  
| >
| >>>> at seealso{mat2cell}")
| >>>>        
| >>>>
| >                         ^
| >
| >parse error near line 27 of file
| >/sw/share/octave/2.1.71/site/m/octave-forge/cell/num2cell.m
| >
| >  syntax error
| >
| >  
| >
| >>>>  int nargin =  args.length();
| >>>>        
| >>>>
| >                   ^
| >
| >error: near line 27 of file
| >`/sw/share/octave/2.1.71/site/m/octave-forge/cell/num2cell.m'
| >error: evaluating assignment expression near line 103, column 16
| >error: evaluating if command near line 102, column 5
| >error: called from `matrix2latex' in file
| >`/sw/share/octave/site/m/matrix2latex.m'
| >
| >  
| >
| I never wrote num2cell for 2.1.x and so I don't think it will compile. 
| But if you are worried about typo's and cut-and-paste errors, I commited 
| it briefly to octave-forge and so its in the CVS Attic at
| 
| 
http://cvs.sourceforge.net/viewcvs.py/octave/octave-forge/main/cell/Attic/num2cell.cc?rev=1.6&view=auto
| 
| Maybe if you replace "octave_idx_type" with "int" it might compile on 
| 2.1.x though I haven't tried. Note the code is in C++ and must be 
| compiled with "mkoctfile num2cell.cc" before being used..

I thnik the bigger problem is that the OP is trying to run the C++
code as a .m file instead of saving it as a .cc file and running
mkoctfile on that.

jwe



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