Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- begin{equation}
- A =
- begin{bmatrix}
- pgfplotsforeachungrouped m in {1,...,3}
- {
- pgfplotsforeachungrouped n in {1,...,3}
- {
- a_{m,n} &
- } \
- }
- end{bmatrix}
- end{equation}
- documentclass{article}
- usepackage{amsmath,bm}
- usepackage{xparse}
- ExplSyntaxOn
- NewDocumentCommand{symbolicmatrix}{O{#2}mm}
- {% #1 = optional number of rows (default square)
- % #2 = number of columns
- % #3 = symbol to repeat
- scumcoder_matrix:nnn { #1 } { #2 } { #3 }
- }
- tl_new:N l__scumcoder_matrix_body_tl
- cs_new_protected:Nn scumcoder_matrix:nnn
- {
- tl_clear:N l__scumcoder_matrix_body_tl
- int_step_inline:nnnn { 1 } { 1 } { #1 }
- {
- int_step_inline:nnnn { 1 } { 1 } { #2 - 1 }
- {
- tl_put_right:Nn l__scumcoder_matrix_body_tl { #3sb{##1 ####1} & }
- }
- tl_put_right:Nn l__scumcoder_matrix_body_tl { #3sb{##1 #2} \ }
- }
- begin{bmatrix}
- tl_use:N l__scumcoder_matrix_body_tl
- end{bmatrix}
- }
- ExplSyntaxOff
- begin{document}
- [
- frac{d}{dt}
- begin{bmatrix}
- bm{varepsilon} \
- dot{bm{varepsilon}} \
- bm{rho}
- end{bmatrix}
- =
- symbolicmatrix{3}{mathbf{F}}
- begin{bmatrix}
- bm{varepsilon} \
- dot{bm{varepsilon}} \
- bm{rho}
- end{bmatrix}
- ]
- [
- symbolicmatrix[2]{4}{a}
- ]
- end{document}
Add Comment
Please, Sign In to add comment