Subtract every element of array from one another and find the sum

18 visualizaciones (últimos 30 días)
Shweta Saboo
Shweta Saboo el 1 de Nov. de 2019
Comentada: Walter Roberson el 2 de Nov. de 2019
I want to subtract each element from one another and find the sum of each column for every element. Array is [47.07 49.39 56.87 69.04 72.80 72.68]
  1 comentario
ME
ME el 1 de Nov. de 2019
I’m not 100% sure I follow. Could you possibly post your expected result from this?

Iniciar sesión para comentar.

Respuestas (1)

Walter Roberson
Walter Roberson el 1 de Nov. de 2019
A.' - A
  4 comentarios
Shweta Saboo
Shweta Saboo el 1 de Nov. de 2019
I want to extract the row from the following matrix having maximum area corresponding to 3rd and 4th column(i.e. 4th row)
349 256 53 53
311 405 72 72
309 330 86 86
531 389 191 191
Walter Roberson
Walter Roberson el 2 de Nov. de 2019
[~, maxidx] = max(YourMatrix(:,3)*YourMatrix(:,4));
ExtractedRow = YourMatrix(maxidx,:);

Iniciar sesión para comentar.

Categorías

Más información sobre Operating on Diagonal Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by