Re: Number of monominals
- To: mathgroup at smc.vnet.net
- Subject: [mg87055] Re: Number of monominals
- From: Patrick Klitzke <philologos14 at gmx.de>
- Date: Sun, 30 Mar 2008 01:17:34 -0500 (EST)
According to the documentation, the function Length[expr] gives the
number of elements in expr.
Also "The length of a symbol is 0".
You have to write it as a list, if you want the expression to be counted.
Length[{f[1]}]
The other inputs are working, because Length counts the elements of the
function Plus:
In[1]:=Length[Plus[f[1],f[2],f[3]]]
Out[1]:=3
OK!
In[2]:=Length[Plus[f[1],f[2]]]
Out[2]:=2
In[3]:=Length[f[1]]
Out[3]:=0
I hope, that I could answer your question.
Patrick