I am trying to solve fourth order differential equation by using finite difference method. I have 5 nodes in my model and 4 imaginary nodes for finite difference method. Therefore, I have 9 unknowns and 9 equations. I would like to write a code for creating 9*9 matrix automatically in MATLAB. But I am not sure how to create this matrix (9*9) automatically. I know that I need to create a loop but I do not know how to do that. I will be very glad for any help. Thank you very much in advance.