MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: documentation specification for Documentation Center-iteration

It was so easy Jean Marc...Thanks1 Thanks also to Daniel for his excellent and clear explanation about how to combine Dos and Folds

--- On Thu, 6/26/08, Jean-Marc Gulliet <jeanmarc.gulliet at> wrote:

From: Jean-Marc Gulliet <jeanmarc.gulliet at>
Subject: [mg90078] Re: documentation specification for Documentation Center
To: fgutiers2002 at, mathgroup at
Date: Thursday, June 26, 2008, 9:55 AM

Francisco Gutierrez wrote:

> I have problems creating packages.  See for example the following very
simple package:
> BeginPackage["fuss`Func`"]
> crisclas::usage="Inputs are a set of training
> vectors, a first guess vector, a zero, and a learning rate ";
> Begin["`Private`"]
> crisclas[trainingvec_,guess_,cero_,ritmo_]:=Module[{guess1=guess,\
> hacerlalista={}},If[trainingvec[[i]].guess-cero>0,   guess,  \
ERROR: the index 'i' has been neither *declared* nor *defined* at this 
stage. At "best", without the package context, the function is going
use whatever value a global called 'i', if any, holds, which is 
certainly not what you want. An easy fix is to define the index 'i' in 
the list of local variables (i.e. first argument of Module[]):

Module[{guess1 = guess, hacerlalista = {}, i = 1},


-- Jean-Marc

  • Prev by Date: A set of several questions
  • Next by Date: Re: ContourPlot problem
  • Previous by thread: Re: A set of several questions
  • Next by thread: Mouse focus in Mathematica