This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Markdown; | |
# Displays given matrix R in Markdown using KaTeX | |
# Optional parameter lims sets how many rows and columns (respectively) will be shown | |
# \cdots, \vdots, and \ddots are used in place of skipped cells | |
function dispMatrix(R, lims=[Inf,Inf]) | |
i = -1 # Start at beginIndex - 2 = 1 - 2 = -1. Minus 2 because one taken up by the \vdots, the other taken up by the last element | |
sizes = size(R) | |
show = min.(sizes,lims) | |
str = "\$\$\\begin{bmatrix} " | |
for row in eachrow(R) |