MathGroup Archive 2008

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

Search the Archive

Re: Number of monominals

  • To: mathgroup at smc.vnet.net
  • Subject: [mg87078] Re: Number of monominals
  • From: Alexey Popkov <popkov at gmail.com>
  • Date: Mon, 31 Mar 2008 02:04:05 -0500 (EST)
  • References: <fsnbd3$d8q$1@smc.vnet.net>

On Mar 30, 10:19 am, Patrick Klitzke <philologo... at gmx.de> wrote:
> 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

Hello,
I can not reproduce such behavour in Mathematica 5.2 and 6.02. How do
you do that?
In[1]:= Length[f[1]]
Out[1]= 1


  • Prev by Date: Re: Fast way to select those elements from a list that are in another
  • Next by Date: Re: Number of monomials
  • Previous by thread: Re: Number of monominals
  • Next by thread: conversion of sin to cos