can i use two symsum functions (two summations) together in one quations in my matlab code?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
i want to use two summations one for i 0 to786 and second for j 0 to 1024 in my matlab code....so can i use two symsum functions together in one equation one with variable i and other with j...
pls help me and reply me asap..
0 comentarios
Respuestas (1)
Vidhi Agarwal
el 30 de Mayo de 2025
Editada: Vidhi Agarwal
el 30 de Mayo de 2025
Yes, in MATLAB you can absolutely use two symsum functions together, one for each symbolic variable, to represent double summation.
Below is a basic implementation of how to do it with two symbolic summations:
syms i j
% Define the expression to sum over
expr = i + j; % Example: any symbolic expression involving i and j
% Double summation: outer sum over i = 0 to 786, inner sum over j = 0 to 1024
total_sum = symsum(symsum(expr, j, 0, 1024), i, 0, 786);
For better understanding of "symsum" refer to the following documentation:
Hope this helps!
0 comentarios
Ver también
Categorías
Más información sobre Calculus en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!