# Creating a matrix in Julia [closed]

I'm having trouble creating this matrix in Julia. I need to find the LU factorization, which I believe I know the code for. Should I be choosing my own $n$ here?

## closed as off-topic by Namaste, Did, user99914, Guy Fsone, SaadApr 3 '18 at 4:29

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Namaste, Did, Community, Guy Fsone, Saad
If this question can be reworded to fit the rules in the help center, please edit the question.

To construct $A$, you declare $a = (a_1, \dots, a_n)$, $b = (b_1, \dots, b_{n-1})$ and $c = (c_1, \dots, c_{n-1})$. The length of the diagonal $n$ will be determined by that of the vector $a$, so there's no need to manually declare the value of $n$.
# Declare vectors a, b and c

• @c87 From the picture, I suppose that the $a_i$'s are given. The first line in the code block reads "declare a, b and c", so you need to do that before you construct $A$. To do so, use a = [a_1 a_2 ... a_n]. For example, a = [1 2 3 ... n]. – GNUSupporter 8964民主女神 地下教會 Mar 29 '18 at 22:23