================================== Top new questions this week: ==================================
[Why is my data 10 times slower than random data when doing matrix multiplication] http://mathematica.stackexchange.com/questions/71377/why-is-my-data-10-times-slower-than-random-data-when-doing-matrix-multiplication
I have some data generated from some program, and it appears that matrix multiplication on these data are about 10 times slower than on some random data:
Get["tb.dat"];
xls = Range[-500, 500, ...
- asked by xslittlegrass (14 votes), answered by DumpsterDoofus (10 votes)
—————————-
[What happens when you divide by ##
?]
http://mathematica.stackexchange.com/questions/71348/what-happens-when-you-divide-by
I’ve been playing around with sequences a bit. In particular with using ##
with unary and
binary operators.
Let’s start simple, the following all make some kind of sense:
+ ## & [a,b] (* a + b ...
- asked by Martin Buttner (13 votes), answered by Pickett (11 votes)
—————————-
[How can FactorInteger be so slow if PrimeQ is fast?] http://mathematica.stackexchange.com/questions/71489/how-can-factorinteger-be-so-slow-if-primeq-is-fast
My 8th grade son had a homework problem to find a prime factor of 99!-1. I thought to be clever/lazy and used FactorInteger[99!-1], but it takes forever. PrimeQ[99!-1] very quickly gives False. It ...
- asked by Martin Rommel (11 votes), answered by sn6uv (16 votes)
—————————-
[Orderless pattern matching] http://mathematica.stackexchange.com/questions/71463/orderless-pattern-matching
The MMA docs state that "In matching patterns with Orderless functions, all possible orders of arguments are tried".
Why then does the following not work?
plus[x__Integer, y__Real] := x+y ...
- asked by sn6uv (9 votes), answered by Mr.Wizard (11 votes)
—————————-
[Why is this evaluation halved when adding units?] http://mathematica.stackexchange.com/questions/71496/why-is-this-evaluation-halved-when-adding-units
Why does this strange behavior occur when dealing with units and quantities?
A[t_] := A0 Exp[-b t / (2m)] FullSimplify[A[Quantity[0, "Seconds"]]]
A0 – ...
- asked by WChargin (8 votes)
—————————-
[Multiple bwspec for BoxWhiskerChart] http://mathematica.stackexchange.com/questions/71478/multiple-bwspec-for-boxwhiskerchart
If I want to make a horizontal boxplot (with outliers) for y:
y = {5.5, 5.61, 4.88, 5.07, 5.42, 5.55, 5.36, 5.29, 5.58, 5.65, 5.57, 5.53, 5.62, 5.29, 5.44, 5.34, 5.79, 5.1, 5.27, 5.39, 5.42, 5.47, ...
- asked by shidangai (7 votes), answered by m_goldberg (6 votes)
—————————-
[The longest run of at most k different elements in a list] http://mathematica.stackexchange.com/questions/71587/the-longest-run-of-at-most-k-different-elements-in-a-list
I have a long list with ca. 500K elements. The list contains about 10K different elements.
For simplicity lets assume the list is of the following form:
list={a,c,b,a,a,a,b,c,e,f,b,a,e,e,e,a}
I ...
- asked by stat_facts (6 votes), answered by Mr.Wizard (5 votes)
================================== Greatest hits from previous weeks: ==================================
[What are the most common pitfalls awaiting new users?] http://mathematica.stackexchange.com/questions/18393/what-are-the-most-common-pitfalls-awaiting-new-users
As you may already know, Mathematica is a wonderful piece of software. However, it has a few characteristics that tend to confuse new (and sometimes not-so-new) users. That can be clearly seen from ...
- asked by belisarius (188 votes), answered by Michael E2 (101 votes)
—————————-
[Assign the results from a Solve to variable(s)] http://mathematica.stackexchange.com/questions/6669/assign-the-results-from-a-solve-to-variables
I understand Mathematica can’t assign the results of a Solve to the unknowns because there may be more than 1 solution. How can I assign the 4 values of following result to variables?
- asked by stevenvh (17 votes), answered by Artes (10 votes)
================================== Can you answer these? ==================================
[Extracting an equation from an interpolated function] http://mathematica.stackexchange.com/questions/71595/extracting-an-equation-from-an-interpolated-function
Im trying to use LibraryLink to do some calculations in C but part of the expression i want to calculate is an Interpolating Function. C cant use that obviously so I’m trying to shift it to a data ...
- asked by Nicholas Gaffney-Henderson (3 votes)
—————————-
[Input `Reduce[Mod[a + x, l] == 0, x]' and output `x == -a + kl`
?]
http://mathematica.stackexchange.com/questions/71365/input-reducemoda-x-l-0-x-and-output-x-a-kl
Reduce[a + x == k l && k > 0, x] (* k > 0 && x == -a + k l *) I think a + x == k l and Mod[a + x, l] == 0 are equivalent, but when I replace a + x == k l by Mod, Mathematica ...
- asked by LoveRight (1 vote)
—————————-
[ListPlot3D keeps crashing] http://mathematica.stackexchange.com/questions/71559/listplot3d-keeps-crashing
I have some data, and I want to plot it by ListPlot3D:
image1 = Import["image1.dat", "TSV"]; image1 // Dimensions (* -> {150000, 3} *) I used: ListPlot3D[image1[[1 ;; 50000]], MaxPlotPoints ...
- asked by yashar (1 vote)