Tag Info

Row function to join together binary number elements

Map[FromDigits @* Flatten @* IntegerDigits, testlist, {2}] ...
• 398k

Row function to join together binary number elements

Let's define a function that joins together two of the entries: join[{x_, y_}] := ToExpression[StringJoin[{ToString[x], ToString[y]}]]; Now we can use this ...
• 69.3k

How to find the most repeating row?

First @ Keys @ ReverseSort @ Counts[tab] {1, 0, 0, 1} Or First @ Normal @ ReverseSort @ Counts[tab] {1, 0, 0, 1} -> 3 ...
• 78.4k
Accepted

How to find the most repeating row?

tab = {{1, 0, 0, 1}, {1, 0, 0, 1}, {0, 1, 0, 1}, {1, 0, 0, 1}, {0, 0, 0, 1}, {1, 0, 0, 0}, {0, 1, 0, 1}} Commonest[tab] {{1, 0, 0, 1}} ...
• 55.7k

Select specific rows of a dataset

You can also use dataset[Select[MatchQ[#a, 2 | 4 | 5] &]] Select[MatchQ[#a, 2 | 4 | 5] &] @ dataset ...
• 398k
Accepted

Select specific rows of a dataset

Query[Select[MemberQ[{2, 4, 5}, #a] &]]@dataset
• 1,782

How to find the most repeating row?

MaximalBy[PositionIndex[tab],Length] (* <|{1, 0, 0, 1} -> {1, 2, 4}|> *)
• 20.2k
Accepted

Applying different values to string row

t = {1, 4, 4, 22, 3, 12, 54, 65} Other ways: ...
• 137k
Accepted

...
• 55.7k

How to find the most repeating row?

Just for variety and to show comparison.MaximalBy as per other users. I have voted for other answers. ...
• 62.1k
Accepted

Plot3D: Inconsistent distance to PlotLabel when using Grid/Row

Use Labeled to place the labels and use the option PlotRegion in Plot3D: ...
• 398k

Row function to join together binary number elements

1 {100, 100} -> 100100 f[{x_,y_}] = x*10^IntegerLength[x] + y; f[{100,100}]; 2 ...
• 9,988

Different output by HoldForm inside a row function

You're looking for AutoMultiplicationSymbol: ...
• 34.2k

...
• 398k
Accepted

Style function not working inside Print Row functions

Try list = {a, b, c}; Separator = Style[" | ", Darker[Green], Bold, 12]; Row[Flatten@ Table[ {ToString[list[[i]]], Separator}, {i, Length[list]}]] Or ...
• 146k

Select specific rows of a dataset

The above answers are excellent, and complete, but when prototyping code, I often find the array indexing with datasets to be useful and sometimes a bit easier to type. Like so: ...
• 490
Accepted

Excluding Specific Rows Using Import[...]

As mentioned in the comments to your question, you just Import the whole data and then manipulate it afterwards. This is (I believe) a very transparent way to ...
• 2,702

How to find the most repeating row?

Another method using GroupBy and Repeated: ...

Applying different values to string row

Perhaps: t = {1, 4, 4, 22, 3, 12, 54, 65}; a = ">}{<" Row[{"{<"}~Join~Riffle[t, a]~Join~{">}"}] or ...
• 62.1k

How do I apply an image filter row by row

Thanks to Kuba I came up with this: ...
• 141

In: ...
• 3,202

Periodical sum of rows by a certain step

Try with the following code: ...

Periodical sum of rows by a certain step

Here we set n=14 instead of n=12 to test the method. ...
• 76.9k

...
• 160k

Periodical sum of rows by a certain step

ClearAll[f1] f1[m_] := Total[Transpose @ Partition[m, Dimensions[m][[2]]], {2}] f1 @ matrix ...
• 398k

Row function to join together binary number elements

list = {{{100, 100}, {101, 101}}, {{110, 110}, {111, 111}}, {{111, 100}, {111, 110}}, {{101, 111}, {110, 101}}}; Using ...

Row function to join together binary number elements

list = {{{100, 100}, {101, 101}}, {{110, 110}, {111, 111}}, {{111, 100}, {111, 110}}, {{101, 111}, {110, 101}}}; Using ...
• 78.4k

How to apply a function to each row of dataset that I imported to Mathematica and get the result of each row

Let's say this is the mock function with five parameters: f[τ_, r_, σ_, S0_, k_] := r + τ Store data in a text file (say "test.txt" and set the folder ...
• 55.7k
1 vote

Periodical sum of rows by a certain step

m = Table[i, {i, 12}, {4}]; i = {#, # + 1, # + 2} & @ {1, 5, 9}; Using Query and ...
• 78.4k
1 vote

Periodical sum of rows by a certain step

You can use SparseArray to create a "summing" matrix, and use Dot: ...
• 131k

Only top scored, non community-wiki answers of a minimum length are eligible