can i use two symsum functions (two summations) together in one quations in my matlab code?

4 次查看(过去 30 天)
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..

回答(1 个)

Vidhi Agarwal
Vidhi Agarwal 2025-5-30
编辑:Vidhi Agarwal 2025-5-30
Hi @Aditi,
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!

类别

Help CenterFile Exchange 中查找有关 Calculus 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by