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


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

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

From Chris <kristoph.steikert@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject compile fct. output as table with elem. of unequal length (vrs. 8.01)
Date 2012-08-25 08:34 +0000
Message-ID <k1a2mt$igg$1@smc.vnet.net> (permalink)
Organization Time-Warner Telecom

Show all headers | View raw


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];

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web