Can anyone help me write this b in matrix form in matlab?
I am letting n=10 for the dimension of A.
Is this a vector? What is A? Is n a constant?
Can you write down what is the value of $b_{i,j}$?
Assuming b is a vector with n elements such that for $i\ne 1$ or $n$ then $b_i = \frac{i^2}{(n+1)^4}$
then in matlab you can write
n = 10; i = 2:(n-1); bmid = i.^2 / ((n+1).^4); b = [1+1/(n+1)^4, bmid, 6+(n^2)/(n+1)^4];
I'm sure there's some clever MATLAB syntax that would make this more compact, but you could always do a for loop
n = 10; b = [1 + 1/(n+1)^4] for i = 2:n-1 b = [b;i^2/(n+1)^4]; end b = [b;6 + n^2/(n+1)^4];
Copyright © 2021 JogjaFile Inc.
Is this a vector? What is A? Is n a constant?
Can you write down what is the value of $b_{i,j}$?
Assuming b is a vector with n elements such that for $i\ne 1$ or $n$ then $b_i = \frac{i^2}{(n+1)^4}$
then in matlab you can write