Reputation
918
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
3 16
Impact
~13k people reached

Apr
25
comment How to use an expression for the argument to a function
Sorry, misunderstood your question. But maybe you could post these functions as working examples in the original post?
Apr
25
comment How to use an expression for the argument to a function
wouldn't f[list_]:=Total@list solve it? (ahem, this is what @sektor meant with Apply)
Apr
22
comment Nesting Parallel processes
On a completely different script, I am also facing the error that @Jagra posted. Interestingly, when I use the exact same code with Map instead of ParallelMap it takes ages to finish the calculations (some 12 hours splitted among 4 computers for Map vs <1hour in one of those computers using ParallelMap). @Szabolcs -- will there be any reason why using Off[ParallelMap::subpar] would still allow the warnings to show up? It's happening here
Apr
21
comment Block works when directly used but not when used in a function
Usually, depending on the question, I like to wait one day to see if other people answer differently or make suggestions before accepting an answer. After that, I usually accept it as long as it really answers my question :) To choose it as an answer just click the checkmark near the arrows on the left side of the answer. It should become green, meaning it was accepted. And welcome @nein! The chat (chat.stackexchange.com/rooms/2234/wolfram-mathematica) is also good and is full of people who are happy to help in simple questions
Apr
21
answered Block works when directly used but not when used in a function
Apr
21
comment Block works when directly used but not when used in a function
It seems that doing SetAttributes[deltaf, HoldAll]; solves the problem, thanks to @IstvánZachar (chat.stackexchange.com/transcript/message/21216245#21216245)
Apr
21
comment Block works when directly used but not when used in a function
would this be anything of what you want? (yes, I know it's a different approach :) ) Clear@ble; ble[j_, k_] := Block[{a, myf}, myf[i_, x_] := (1 - x)*Sum[a[i, k]^2, {k, 1, 3}]; Sum[D[myf[A, x], a[i, k]], {i, {A, B}}, {k, {1, 2, 3}}] ] ble[A, x]
Apr
21
comment Block works when directly used but not when used in a function
Actually, I think you want the exact opposite of what I was suggesting. Notice that when you do deltaf[f1[A,x]] you are evaluating D[f, a[i, k]] (=14 (1 - x)) AND THEN using this result to compute the Sum. This is why the derivative then gives 0, because you are evaluating the derivatives of 14(1-x) with respect to a[i,k].
Apr
21
comment Block works when directly used but not when used in a function
Did you try deltaf[Evaluate[f1[A, x]]]?
Feb
11
awarded  Popular Question
Nov
13
accepted Is there a way to show some “weighted” residuals after LinearModelFit?
Nov
13
comment Deleting empty cells and selecting cells matching a pattern
eh, it works, also on those with multiple paragraphs and stuff!
Nov
13
comment Deleting empty cells and selecting cells matching a pattern
You are right, I was only thinking on what I see in a notebook. Indeed, some cells often have "\n" and I don't see those, so maybe the search could be on white space?
Nov
13
asked Deleting empty cells and selecting cells matching a pattern
Nov
12
comment Is there a way to show some “weighted” residuals after LinearModelFit?
eh @belisarius, hand't thought about that :)
Nov
12
asked Is there a way to show some “weighted” residuals after LinearModelFit?
Oct
20
revised Comparing two ways of fitting systems of ODEs to data
added 4114 characters in body
Oct
2
comment ParametricNDSolve and Constraint satisfaction problem
Sorry to bump this old thread, but some time ago when I was no longer working with this I thought about a different approach that possibly could give what I wanted. I was thinking that maybe using CountourPlot[] possibly would be more efficient, with the countours specifying which areas would satisfy the constraints? Anyways, this is just an idea. If I get some spare time I'll try it out just for fun
Sep
24
awarded  Autobiographer
Sep
19
asked Comparing two ways of fitting systems of ODEs to data