Compile function and AppendTo for lists (vrs. 8.0.4)
- To: mathgroup at smc.vnet.net
- Subject: [mg124544] Compile function and AppendTo for lists (vrs. 8.0.4)
- From: kris <kristophs.post at web.de>
- Date: Tue, 24 Jan 2012 05:06:23 -0500 (EST)
- Delivered-to: firstname.lastname@example.org
I have some trouble with my code and would like ask for your help. In
general it is about appending data in form of a list to an existing
list in a compiled function. As far as I understand Mathematica is not
supporting what I am asking for. In order to understand the problem in
more detail I present some "toy" code below.
(*which produces an error*)
Appending data in form of numbers for example works just fine but not
with lists. Can anybody explain why Mathematica does not support
appending lists to lists for compiled function? As an alternative I
tried Reap and Sow, which also produces an error.
However, what seems funny is the following code:
The above code produces the result that I was looking for in a
cumbersome way. I would like to prefer compile code which produces the
same result without calling the list mat again.
Thanks for help I do appreciate it.
Prev by Date:
Plotting in nested Manipulates
Next by Date:
Re: exercises: suppress printing of answers
Previous by thread:
Re: Plotting in nested Manipulates
Next by thread:
Re: Compile function and AppendTo for lists (vrs. 8.0.4)