Hot answers tagged

20 votes
Accepted

Column makes fonts smaller

There is an option for Column or Grid to avoid this: AllowScriptLevelChange ...
user45937's user avatar
  • 1,291
18 votes
Accepted

Delete column from a dataset in mathematica

You can use KeyDrop: ...
kglr's user avatar
  • 384k
11 votes

Column makes fonts smaller

Another approach is to set AllowScriptLevelChange -> False via GridBoxOptions: ...
Alexey Popkov's user avatar
8 votes
Accepted

using DeleteCases to delete vectors with particular index as 0

DeleteCases[set, {___, 0}] {{0, 1, 1, 0, 1}, {1, 0, 1, 1, 1}} In this case Pick also ...
Mr.Wizard's user avatar
  • 270k
8 votes
Accepted

What is a good way of perfoming operations on specified columns of a table with many columns

myTable = Array[Subscript[a, Row[{##}]] &, {5, 10}]; MatrixForm @ myTable functions = {foo, bar}; columns = {2, 5}; 1. <...
kglr's user avatar
  • 384k
8 votes

What is a good way of perfoming operations on specified columns of a table with many columns

A little too long for a comment, and I have marked this as 'Community Wiki' (not an original contribution). In addtion, I think the Query method should not be '...
8 votes
Accepted

How to convert a Dataset into an indexed dataset / association-of-associations given a column header?

...
Anton Antonov's user avatar
8 votes
Accepted

Why is the graph size decreasing in 'Column'?

ImageSizeMultipliers Wrap Column[...] with Style[#, ImageSizeMultipliers -> {1, 1}] &: ...
kglr's user avatar
  • 384k
7 votes

Building a matrix from the columns of others

n = 4; p = 2; m = 3; aa = Array[Subscript[a, ##] &, {n, m}]; bb = Array[Subscript[b, ##] &, {p, m}]; Join ...
kglr's user avatar
  • 384k
7 votes

What is a good way of perfoming operations on specified columns of a table with many columns

kglr's ReplacePart method is completely general, but I think in many situations writing the rules explicitly is easier and gives more readable code. So I would ...
m_goldberg's user avatar
  • 107k
6 votes

How to replace columns of a matrix with an unsorted ordered list.

Transpose[Ordering@Ordering@# & /@ Transpose@m] {{2, 2}, {1, 3}, {3, 1}} Edit jjc385 suggests this neat modification: ...
user1066's user avatar
  • 15.6k
6 votes
Accepted

Switch Orientation of Rows/Columns in Grid, Column layout constructs

Bob has shown one way to set the Background property of Column. Here is another way: ...
C. E.'s user avatar
  • 70k
6 votes

using DeleteCases to delete vectors with particular index as 0

Or... Select[set, Last[#] != 0 &] or... Select[set, #[[-1]] != 0 &] or... ...
David G. Stork's user avatar
6 votes
Accepted

Force placed Legend into one column

You are almost there. Use a LineLegend instead. ...
Syed's user avatar
  • 41.5k
5 votes
Accepted

How to Subtract column from another in dataset

...
Rohit Namjoshi's user avatar
5 votes
Accepted

Identify maximum difference in Matrix

Depending on your taste, d = MapThread[{#1[[1]] - #2[[1]], #1[[2]]} &, {X, Y}] or ...
Roman's user avatar
  • 45.9k
5 votes
Accepted

Add columns with dummies and specific headers to dataset

I am sure there is a better way, but the following does the job: ...
kglr's user avatar
  • 384k
5 votes

Switch Orientation of Rows/Columns in Grid, Column layout constructs

...
Bob Hanlon's user avatar
  • 151k
5 votes
Accepted

Change number of columns in grid

Update: a more flexible approach: ...
kglr's user avatar
  • 384k
5 votes

Building a matrix from the columns of others

appending the ith column of A and ith column of B A = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; B = {{10, 11, 12}, {14, 15, 16}}; <...
Nasser's user avatar
  • 137k
5 votes

How to convert a Dataset into an indexed dataset / association-of-associations given a column header?

ClearAll[f0] f0 = GroupBy[##, Association @* KeyDrop[#2]] &; Examples: ...
kglr's user avatar
  • 384k
5 votes

How to convert a Dataset into an indexed dataset / association-of-associations given a column header?

Related to kglr's answer, here's a slight variation: ...
Sjoerd Smit's user avatar
  • 21.9k
5 votes

How can I separate expressions in Module without suppressing output?

Try this: ...
Alexei Boulbitch's user avatar
5 votes

Replacing a column in a matrix by its Log

In the newest version you can do: mat[[All,3]] //= Log[#+1]& Older versions: mat[[All,3]] = Log[mat[[All,3]]+1]
SHuisman's user avatar
  • 3,144
4 votes

How to replace columns of a matrix with an unsorted ordered list.

Let's start with a single column: col = {0.5, 0.2, 0.7}. Applying Ordering to it gives ...
jjc385's user avatar
  • 3,473
4 votes

Normalize a vector: error

If you want to make vectors a special case of matrices (this can be useful for some applications), you can normalize this way: ...
John Doty's user avatar
  • 13.7k
4 votes

Normalize a vector: error

Mathematica's vectors are always simple lists (tutorial). In this sense there is no distinction between row vectors and column vectors, unlike Matlab etc. A propos ket vs bra: if you define a state ...
Roman's user avatar
  • 45.9k
4 votes
Accepted

Export output to a text file

Here is an approach that address the core of your request First strip the values from the Association and group them with ...
PaulCommentary's user avatar
4 votes

Export output to a text file

If this is really the structure, maybe you could use a dataset instead? pdata = Partition[coord/. h_[i_Integer] -> h, 3] ds = Dataset[Association @@@ pdata] ...
Alan's user avatar
  • 13.6k
4 votes

GraphicsColumn - Multiline text isn't adapting based on overall column size

I put your text in a TextCell with a limited x-direction size. ...
Jean-Pierre's user avatar
  • 5,187

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