Import numpy, define Python function, and print Fibonnacci sequence.
Code
# label: fig-polar# fig-cap: "A line plot on a polar axis"import numpy as np;def mm_fib(n):return (np.matrix([[2,1],[1,1]])**(n//2))[0,(n+1)%2]print([mm_fib(i) for i inrange(20)])
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com. Quarto supports R Markdown & Knit