User Portlet
| Discussions |
|---|
| Thanks for any help! I must be doing something wrong in the following recursive code: ClearAll[lim, hlim, count, e] lim = 25; hlim = lim/5; count[heading_, v_] := count[heading, v] = Block[{nv = v}, If[Total[nv] ==... |
| I've been programming in Mathematica for a couple years. I realize that For[] loops are not idiomatic and can be rather slow, but I don't see why the code below (the equivalent of which runs in 4 minutes in Racket - scheme - lisp) takes 43 hours... |
| It is May 12 today, on May 2 FMAGX did a distribution, but it is not yet shown in the "adjusted" data: FinancialData["FMAGX", "Close", {2014, 4, 29}] {{{2014, 4, 29}, 93.02}, {{2014, 4, 30}, 93.17}, {{2014, 5, 1}, 93.47},... |
| I have a graph with 6401 vertices. It takes about 30 seconds to run FindShortestPath[g,0,6400,Method->Dijkstra]. This is acceptable, but I wonder if I could speed it up. An equivalent Racket package is about 100x faster and Racket isn't renowned... |
| When I bring up Mathematica, I'd like the windows (including help) to open just as they were when I closed Mathematica last. That way I don't have to resize/move windows every time I bring up the tool. I can't figure out how to set the preferences... |
| As I'm learning to program Mathematica, I'm quickly collecting quite a number of notebooks that I've written. When I want to remember an idiom or technique I've used, I need to search the notebooks. I've found that the directory search in Win 7 is... |
| I wrote the following code: [mcode]ptable = Map[(3 #^2 - #)/2 &, Range@4500]; For[k = 2250, k > 1, k--, atk = ptable[[k]]; For[j = k - 1, j >= 1, j--, atj = ptable[[j]]; If[MemberQ[ptable, atk - atj] && MemberQ[ptable, atk + atj], Return[atk -... |
| I'd like to turn the output of this: f[8, n_] = n (3 n - 2);[mcode]Reduce[100000 > f[8, n] > 10000 && n > 0, n, Integers] out[1]= n \[Element] Integers && 59 |
| I got a list from a datafile: ctxt = Flatten[ StringSplit[Import["d.txt", "Data"], ","]]; Then I got every third number: lst3 = ctxt[[3 ;; ;; 3]]; When "looked" at lst3 in an outcell it looked like a list of numbers {79,... |
| I'm writing a program and using FullSimplify. Its output is: n == 31977 && m == 27693 I just want to collect 31977 into a var. What is the easiest way to do that? thanks! -Joe |