https://github.com/xandkar/mathematica-cheat-sheet
How to do some simple, but non-obvious (to me) stuff in Mathematica
https://github.com/xandkar/mathematica-cheat-sheet
Last synced: 6 months ago
JSON representation
How to do some simple, but non-obvious (to me) stuff in Mathematica
- Host: GitHub
- URL: https://github.com/xandkar/mathematica-cheat-sheet
- Owner: xandkar
- Created: 2015-12-06T00:15:39.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-06T00:24:41.000Z (almost 10 years ago)
- Last Synced: 2024-10-19T03:06:39.509Z (12 months ago)
- Homepage:
- Size: 1000 Bytes
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mathematica-cheat-sheet
How to do some simple, but non-obvious stuff in MathematicaMatrices
--------#### Build from folding a list
```mathematica
(* ArrayReshape[list, {n, n}] *)In[1]:= ArrayReshape[Alphabet[], {3, 3}]
Out[1]= {{"a", "b", "c"}, {"d", "e", "f"}, {"g", "h", "i"}}
```#### Non-destructive column/row replace
```mathematica
(* ReplacePart[list, rule] *)In[1]:= ReplacePart[
{{"a", "b", "c"}, {"d", "e", "f"}, {"g", "h", "i"}},
{_, 1} -> 0
]
Out[1]= {{0, "b", "c"}, {0, "e", "f"}, {0, "h", "i"}}
```