MathGroup Archive 2001

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

Search the Archive

Subscripted variables and FindRoot?


Hello,

I love using subscripted variables for readability, but they seem to
have their limitations. FindRoot[ ] seems to burp when presented with a
function that takes a subscripted variable as input. Also, and probably
related, how do you declare a subscripted variable as a pattern for a
function? Patterns and subscripts seem to clash.

This is no problem...

foo[x_]:= x^2

This is a problem (read Xy as x-subscripted-y)

foo[Xy_] := Xy^2

Where it does not recognize compute z^2 when presented with

foo[z]

Any hints on how to work with them?



  • Prev by Date: 3D-Plots: Coloring edges (simple)
  • Next by Date: Multiple choice question
  • Previous by thread: Re: 3D-Plots: Coloring edges (simple)
  • Next by thread: Re: Subscripted variables and FindRoot?