| bio | website | |
|---|---|---|
| location | ||
| age | ||
| visits | member for | 3 months |
| seen | May 14 at 14:54 | |
| stats | profile views | 26 |
|
Mar 17 |
accepted | Save variables values and definition |
|
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 15 |
asked | Save variables values and definition |
|
Mar 15 |
accepted | Extract function arguments |
|
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 12 |
asked | Extract function arguments |
|
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. |
|
Mar 1 |
asked | Problem with creating a large list of tuples |
|
Feb 24 |
awarded | Enthusiast |
|
Feb 16 |
accepted | Sum of Multinomial Coefficients |