0
votes

I got an equation S with 2 variables h and k. Now iwant to aquire the solution of this as a 11x11 matrix with values from 1 to 10 for h and k. So the matrix should include every solution in this format:

S(0,0) S(1,0) S(3,0) S (4,0) S(0,1) S(1,1) S(3,1) S (4,1) S(0,2) S(1,2) S(3,2) S (4,2) S(0,3) S(1,3) S(3,3) S (4,3) etc.I thin you get what i mean.

Is this somehow possible with matlab?

1

1 Answers

1
votes

For your example I would go for the easies solution, which is using for loops:

output = zeros(11, 11);
for ii = 0:10
    for jj = 0:10
        output(ii, jj) = S(ii, jj);
    end
end

Unless you are facing a difficulty which is not included in your example.