236 reputation
26
bio website
location
age
visits member for 1 year, 10 months
seen Dec 6 '13 at 11:40

Mar
15
comment Save variables values and definition
Yes,all the definitions and the values
Mar
15
comment Save variables values and definition
@Mr. Wizard isn't that post about saving a whole function definition to a file? Whereas here I'm trying to save variable name based on subscript. I already read that post and found out about DumpSave.
Mar
15
comment Save variables values and definition
Thanks, but actually it's more difficult than that. I apply another more complicated function. And I do need this specific output because it's an input somewhere else
Mar
15
comment Save variables values and definition
yes, I didn't geht the syntax right, I tried DumpSave["values.mx", Table[Subscript[vars, idx[[i]]] = Total[idx[[i]]], {i, 1, Length[idx]}]] but got an error (*DumpSave::bsnosym: "Table[..] is not defined as a symbol or a context"*)
Mar
14
comment Extract function arguments
thank you. yes just the argument-only list, but I need it to be in the same order. How can I use 'Hold' here?
Mar
14
comment Extract function arguments
Wizard! Thanks, the first solution really helps me. Do u maybe know how to get just the arguments in a list: just {{1},{2},{3},{1,2},{1,3},{1,2,3}} like in the example?
Mar
12
comment Extract function arguments
thanks,I figured that out already, but thats not exactly what I want to do: I want to transform e.g.6*g[1]*g[2]*g[3] into 6*func[{1,2,3}]
Mar
6
comment Problem with creating a large list of tuples
No, actually n has a value: n = 20; Do[tmp = lazyTuple[Range[0, n], (n - 1)][[i]]; If[Total[tmp] == (n - 1), Print[(Multinomial @@ tmp)*func[supp[tmp]]]], {i, 1, (n + 1)^(n - 1)}] (*20 Do::iterb...*) where supp is the function provided by Simon Woods
Mar
5
comment Problem with creating a large list of tuples
I think my function is really using to much memory because I get the following error Do::iterb: "Iterator {i,1,(n-1)^(n+1)} does not have appropriate bounds". I looking for all tuples Tuples`[Range[0,n],(n-1)] where the sum is equal to (n-1), calculate with these the Multinomial Coefficient and apply a function. Since I don't have any cs background I thought I seek help from you guys.
Mar
5
comment Problem with creating a large list of tuples
Yes, I did that, but i need to apply a function to the every tuple, and if I loop through all tuples eg Do[func[lazyTuples[Range@20,19][[i]]],{i,1,19^20}]. Mathematica tells me it can't evaluate it.
Mar
5
comment Problem with creating a large list of tuples
Thanks! I edited my code and tried to create the tuples "on the fly" but for let's say for Tuples[Range[0,20],19] I loop through all possible Tuples. But there are approx. 19^20 Tuples and mathematica can't handle such a large number. Is there any other way?
Mar
2
comment Problem with creating a large list of tuples
Thank you. Truly nice performance improvement! For the code to work for large n, I think I need to think about an iterative approach
Mar
2
comment Problem with creating a large list of tuples
@jVincent Thanks for the Link. But do I miss something, because I tried the first code in your answer but that it did not work.
Feb
15
comment Sum of Multinomial Coefficients
No unfortunately not. Its my job to do de computation and provide numerical examples. The only "external" information is that i am given the number $m$ and that $L\subseteq \{1,...,n\}$.I think I'll need to think it through once more, maybe I'll understand what's meant then.
Feb
15
comment Sum of Multinomial Coefficients
I does not make sense to me either, until now I haven't seen such an expression. These sum is an input into another function. I wrote down exactly how it is formulated in the paper. I'm sorry
Feb
15
comment Sum of Multinomial Coefficients
Thank you. But it's actually more complicated. I'm still not 100% sure if i got how one calculates the sum. I updated my question. I think it means that if $L=(1,2,4,5)$ that the third element can be zero. I'm sorry I haven't seen such a notation.
Feb
15
comment Sum of Multinomial Coefficients
thank you, I also do need a variation of that. Do you have an idea how to get only that coefficients where $k_i$ is not 0. In your example above it would be just the last term $\binom{5}{1\ 1\ 1\ 2}$?
Feb
14
comment Sum of Multinomial Coefficients
I'm so sorry I didnt saw that you wrote an answer! I wouldnt have deleted the question. I figured out the same solution as you posted myself. Anyway I'll keep the question! I apologize once more!
Feb
12
comment Speed up Numerical Integration
thank you all very much, I figured out how i could optimize my integration, but i have one last point. I have to Integrations the first I need to use "normal" Integrate and in the second one NIntegrate. I can't use NIntegrate in the first because there are still variables in the output . Is it possible to speed that further up? I have no assumptions to make to the function.
Feb
12
comment Get unique values for integration limits
Thanks, but I also need to remove the unnecessary sublists of x1,x2,x3. I just want the first sublist for x1, second one for x2,...