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

1 回表示 (過去 30 日間)
Shweta Saboo
Shweta Saboo 2019 年 11 月 1 日
コメント済み: Walter Roberson 2019 年 11 月 2 日
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 件のコメント
ME
ME 2019 年 11 月 1 日
I’m not 100% sure I follow. Could you possibly post your expected result from this?

サインインしてコメントする。

回答 (1 件)

Walter Roberson
Walter Roberson 2019 年 11 月 1 日
  4 件のコメント
Shweta Saboo
Shweta Saboo 2019 年 11 月 1 日
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 2019 年 11 月 2 日
[~, maxidx] = max(YourMatrix(:,3)*YourMatrix(:,4));
ExtractedRow = YourMatrix(maxidx,:);

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by