       Re: Question?

• To: mathgroup at smc.vnet.net
• Subject: [mg4102] Re: Question?
• From: rhall2 at umbc.edu (hall robert)
• Date: Tue, 4 Jun 1996 02:18:41 -0400
• Organization: University of Maryland, Baltimore County
• Sender: owner-wri-mathgroup at wolfram.com

```In article <4obgli\$opu at dragonfly.wolfram.com>,
Borworn Wongsaengchantra  <wborworn at vt.edu> wrote:

>I am a novice for Mathematica and I have a problem with Mathematica's command.

Yea, me too. ;)

>I want to show out put like this:
>   /out/ {f1[x],f2[x],f3[x],...,fn[x]}
>Do you know how to use that command?

Here's my best guess:

In:=
Outer[
ToExpression[StringJoin["f", #]& /@ Map[ToString, Range]],
{x}
] // Flatten
Out=
{f1[x], f2[x], f3[x], f4[x], f5[x]}

or

In:=
ToExpression[StringJoin["f", #]& /@ Map[ToString, Range]];
Out=
{f1[x], f2[x], f3[x], f4[x], f5[x]}

Anybody know how to do this without converting from expression
to string and back?

If you're willing to live with subscripts, another way is:

In:=
Table[Subscripted[f[i]][x], {i, 1, 5}]
Out=
{f [x], f [x], f [x], f [x], f [x]}
1      2      3      4      5

If you don't like the subscripts but can tolerate an additional
space, try this:

In:=
Table[SequenceForm[f i[x]], {i, 1, 5}]
Out=
{f 1[x], f 2[x], f 3[x], f 4[x], f 5[x]}

--
Bob Hall            | "Know thyself? Absurd direction!
rhall2 at gl.umbc.edu  |  Bubbles bear no introspection."  -Khushhal Khan Khatak

==== [MESSAGE SEPARATOR] ====

```

• Prev by Date: Re: question