20
votes
Accepted
Column makes fonts smaller
There is an option for Column or Grid to avoid this: AllowScriptLevelChange
...
18
votes
Accepted
11
votes
Column makes fonts smaller
Another approach is to set AllowScriptLevelChange -> False via GridBoxOptions:
...
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 ...
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. <...
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
8
votes
Accepted
Why is the graph size decreasing in 'Column'?
ImageSizeMultipliers
Wrap Column[...] with Style[#, ImageSizeMultipliers -> {1, 1}] &:
...
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
...
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 ...
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:
...
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:
...
6
votes
using DeleteCases to delete vectors with particular index as 0
Or...
Select[set, Last[#] != 0 &]
or...
Select[set, #[[-1]] != 0 &]
or...
...
6
votes
Accepted
5
votes
Accepted
5
votes
Accepted
Identify maximum difference in Matrix
Depending on your taste,
d = MapThread[{#1[[1]] - #2[[1]], #1[[2]]} &, {X, Y}]
or
...
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:
...
5
votes
Accepted
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}};
<...
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:
...
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:
...
5
votes
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]
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
...
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:
...
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 ...
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 ...
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]
...
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.
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
column × 53plotting × 12
list-manipulation × 9
matrix × 9
dataset × 8
grid-layouts × 8
manipulate × 5
row × 4
graphics × 3
import × 3
dynamic × 3
data × 3
size × 3
export × 2
replacement × 2
formatting × 2
legending × 2
vector × 2
display × 2
alignment × 2
equation-solving × 1
functions × 1
front-end × 1
programming × 1
linear-algebra × 1