Double Sigma with an equation

Hello people, I am very new to Matlab and got stuck to a question;
The coefficients in the matrix will be used in the equation. How can I use the code and get the answer for the eqn?

1 comentario

Ameer Hamza
Ameer Hamza el 9 de Mzo. de 2020
what is ? Is it element on i-th row and j-th column of the matrix?

Iniciar sesión para comentar.

Respuestas (2)

Prasanna Gude
Prasanna Gude el 12 de Mzo. de 2020

0 votos

The equation can be solved with the help of ‘for’loop and ‘sum’ function in MATLAB. The following code will solve the equation:
for j = 1:5
for i = 1:5
X(5) = x(i,j)+x(j,i)-(x(i,i)^2);
end
sum1(5) = sum(X);
end
SUM = sum(sum1);
When you are doing both the summations from 1 to 5, the matrix ‘x’ must be of size 5x5 or above.
Paola Carranza Bravo
Paola Carranza Bravo el 7 de Sept. de 2021

0 votos

for j = 1:5
for i = 1:5
X(5) = x(i,j)+x(j,i)-(x(i,i)^2);
end
sum1(5) = sum(X);
end
SUM = sum(sum1);

Categorías

Más información sobre Mathematics en Centro de ayuda y File Exchange.

Productos

Versión

R2019b

Preguntada:

el 9 de Mzo. de 2020

Respondida:

el 7 de Sept. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by