フィルターのクリア

Sum of base exponentials e

1 回表示 (過去 30 日間)
Ricardo Gutierrez
Ricardo Gutierrez 2018 年 6 月 7 日
コメント済み: Ricardo Gutierrez 2018 年 6 月 7 日
Good afternoon.
I hope you can support me in the following:
I have the following matrix 2 X 3
x1 = [8 2 9;
2 3 2]
I want to do the following, I know that I take element by element of the first line of the matrix and that I do the sum:
AF = 5 * exp (8) + 5 * exp (2) + 5 * exp (9)
After that take the elements of the second line and as the sum does
AF = 5 * exp (2) + 5 * exp (3) + 5 * exp (2)
The first sum of the first line gives 55456.83 and the second sum of the second row gives 174.32
The matrix that I really have is 200 X 10 but the same will be done for those 200 lines.
I hope you help me because I've tried it several times and I could not.
Greetings.

採用された回答

per isakson
per isakson 2018 年 6 月 7 日
Matlab is clever
>> 5*sum( exp(x1), 2 )
ans =
1.0e+04 *
5.545715485358022
0.017431824560524
  1 件のコメント
Ricardo Gutierrez
Ricardo Gutierrez 2018 年 6 月 7 日
Thank you very much!!!!!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultidimensional Arrays についてさらに検索

製品


リリース

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by