Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #11497 > unrolled thread

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

Started byChris <kristoph.steikert@gmail.com>
First post2012-08-25 08:34 +0000
Last post2012-08-25 08:34 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  compile fct. output as table with elem. of unequal length (vrs. 8.01) Chris <kristoph.steikert@gmail.com> - 2012-08-25 08:34 +0000

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

FromChris <kristoph.steikert@gmail.com>
Date2012-08-25 08:34 +0000
Subjectcompile fct. output as table with elem. of unequal length (vrs. 8.01)
Message-ID<k1a2mt$igg$1@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];

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web