MathGroup Archive 2012

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

Search the Archive

compile fct. output as table with elem. of unequal length (vrs. 8.01)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg127827] compile fct. output as table with elem. of unequal length (vrs. 8.01)
  • From: Chris <kristoph.steikert at gmail.com>
  • Date: Sat, 25 Aug 2012 04:24:40 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net

Hi 

The output of my compile function should be a matrix with elements of unequal length. Meaning that e.g. the first row is a vector and the second a number. 

I provide some toy-code below which generates an error. Thanks in advance. 

Clear[toy,xVec];

toy=Compile[{{x,_Real,1}},
Block[{leg},
leg=Length[x];
{x,leg}
]];

xVec=Table[RandomReal[],{10}];
toy[xVec];



  • Prev by Date: Re: How to use Pick[]; Is this a bug?
  • Next by Date: Re: Find the value of x & y
  • Previous by thread: Re: Find the value of x & y
  • Next by thread: ContourPlot non rectangular evaluation?