Hi,
I understand that you need to calculate the sum of the values returned by function "G" for values of "i" ranging from 1 to "n" for a given value of "j".
To achieve this, you can use a for loop in MATLAB. Here is an example of how to implement it:
value_of_G_at_j = 0;
for i = 1 : n
value_of_G_at_j = value_of_G_at_j + G(i, j);
end
Please note that in this approach, I assume that "G" is a function that takes "i" and "j" as input variables and returns a single integer value.
The "symsum" function can be used for symbolic vectors or matrices, and not for functions. For more details on "symsum" you can refer to the below documentation:
https://www.mathworks.com/help/symbolic/sym.symsum.html
Hope this helps!
Regards,
Aryan Gupta