Steps to create additional table on matrix

A=zeros(5,5) # it represent 5x5 matrix having 0 number

for i in 1:5

for j in 1:5
A[i,j]=i+j # square bracket for indices.as indices start from 1
end
end
A

output :5x5 Array
2.0 3.0 4.0 5.0 6.0
3.0 4.0 5.0 6.0 7.0
4.0 5.0 6.0 7.0 8.0
5.0 6.0 7.0 8.0 9.0
6.0 7.0 8.0 9.0 10.0

Is this a question?

2 Likes

This is your second post which is very hard to understand, or even figure out if it is a question.

Please respect the time that people devote to helping others on this forum by investing some effort into formulating your post more clearly.

Also, please quote your code, and make it easier to help you.

1 Like

sorry for the inconvenience i edited my post please check it

Sorry but I don’t think this edit is really helping - could you formulate an actual question? And please do read through the posts linked by @Tamas_Papp that explain how you can share your problem in the way that makes it most likely that others are able to help you.

1 Like