Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

RE: problem with modules

  • To: mathgroup at
  • Subject: [mg72253] RE: [mg72228] problem with modules
  • From: "David Park" <djmp at>
  • Date: Sat, 16 Dec 2006 05:18:21 -0500 (EST)


Use something like...

 Module[{U, L},
  U = compute U;
  L = compute L;
  {U, L}]

Don't use MatrixForm in the Module if you want to use U and L. Return U and
L as a list of the two matrices. You do not have to use the Return
statement. Just make {U, L} the last statement in the Module.

You could use this as...

{umat, lmat} = genUL[...]


MatrixForm /@ genUL[...]

David Park
djmp at

From: jltrahan at [mailto:jltrahan at]

I do not understand how to return a result from a module so that I can use
the result globally. I am trying to generate 2 matrices from the module.
For example,

When I type ludecomp[n,A], it returns a result, however, when I try to
input just the variable U, it
doesn't return a value. I'd greatly appreciate any help that you can

Thank you,

  • Prev by Date: RE: image border
  • Next by Date: Re: Can FindFit handle two dependent variables?
  • Previous by thread: Re: problem with modules
  • Next by thread: RE: problem with modules