Timeline for How to inject segments of code into functions defined by SetDelayed [duplicate]
Current License: CC BY-SA 3.0
12 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Dec 22, 2015 at 11:57 | vote | accept | QuantumDot | ||
| Dec 22, 2015 at 6:24 | history | closed | Kuba MarcoB m_goldberg CommunityBot Leonid Shifrin | Duplicate of Enforcing correct variable bindings and avoiding renamings for conflicting variables in nested scoping constructs | |
| Dec 21, 2015 at 22:30 | answer | added | Mike Honeychurch | timeline score: 5 | |
| Dec 21, 2015 at 22:15 | review | Close votes | |||
| Dec 22, 2015 at 6:26 | |||||
| Dec 21, 2015 at 22:13 | comment | added | QuantumDot | @MikeHoneychurch Input f[3] gives Sum[int[i],{i,1,n}]+y. The n didn't get replaced by 3. | |
| Dec 21, 2015 at 22:07 | comment | added | Mike Honeychurch | Above you say With isn;t working on your computer. This would normally be done using With. Can you show us what you get? | |
| Dec 21, 2015 at 21:39 | comment | added | Kuba | Not the one I've thought about but I think it's good enough: 20766 | |
| Dec 21, 2015 at 21:36 | comment | added | Kuba | Ok, here is one way: (f[n_] := # + y; g[n_] := #^2;) &[ Sum[int[i], {i, 1, n}] ] there should be a duplicate somewhere. | |
| Dec 21, 2015 at 21:35 | comment | added | QuantumDot | int[i] is a recursively defined symbolic function (the result is usually a polynomial plus some logarithms), y is a similar object (polynomial+logs) but known explicitly (no recursive code). | |
| Dec 21, 2015 at 21:32 | comment | added | e.doroskevic | @QuantumDot what are int and y terms in your code? | |
| Dec 21, 2015 at 21:28 | comment | added | QuantumDot | With isn't working on my computer (Mathematica 10.2 on Mac OS X). What version are you using? | |
| Dec 21, 2015 at 21:15 | history | asked | QuantumDot | CC BY-SA 3.0 |