User Portlet
Discussions |
---|
If you copy the actual dash and paste that it will work, as Sander points out it isn't actually a hyphen. |
This seems to do what you require AbsoluteTiming[ Position[a = RandomInteger[10^7, 10^6], b = Max[a]]; {b, c}] {0.0947826, {9999991, {33357, 164350, 204442, 426967, 488483, 524782, 602322, 728467, 831565, 868132}}} |
I believe this works too Clear[a, b, c, d, e]; Sort /@ Select[Tuples[{a, b, c, d, e}, {3}], Count[#, b] |
If you factor the factor you get what you are looking for Factor[Factor[x^2 - 5 x - 8, Extension -> All]] However, just because it doesn't look like what you are expecting doesn't mean its wrong in the case of Sander's example. |
You could also extend it to any partition size, for example sets of 3 list = Partition[RandomInteger[{-10, 10}, 160], 3]; AbsoluteTiming[ Select[list, #[[1]] >= -1 && #[[2]] = 1 &]] |
If we try NSum[1/Sqrt[n] - Sqrt[Log[1 + 1/n]], {n, 0, Infinity}] It won't evaluate, but NSum[1/Sqrt[n] - Sqrt[Log[1 + 1/n]], {n, 1, Infinity}] 1.96429*10^123 |
This sorts the list by column 2 with no errors on my end Clear[randomTriples]; randomTriples = Table[{RandomReal[{-1, 1}, 3]}, 100]; SortBy[randomTriples, -#[[All, 2]] &] |
I usually find if I get that kind of output it's because I haven't given enough information in the form of limits, i.e. also include an upper value for {l, m, n, o, p, x}. However, if you examine the behaviour of just the first Mod section you will... |
This would work, but first I opened the csv file with excel and saved it as an xlsx file. and the file is where MMa first looks for files. data = Flatten[Import["frequency-and-phase-data.xlsx", "Data"], 1]; list = {}; Do[x =... |
The first part is quite easy list1 = {1, 3, 4, 7, 10, 12, 15, 17, 19, 24, 26, 29, 32, 35}; list2 = {2, 5, 6, 7, 8, 9, 11, 12, 14, 19, 25, 27, 29, 30}; position = Intersection[list1, list2] There are probably more elegant... |