フィルターのクリア

Error in a matrix operation

2 ビュー (過去 30 日間)
Tamia Eli
Tamia Eli 2020 年 7 月 21 日
コメント済み: Star Strider 2020 年 7 月 21 日
Can you explain me what is the problem?, I want to operate with my column matrix c, I tried to conver it to row matrix.
c =
Columns 1 through 5
-0.0465421133865154 -0.0349065850398866 -0.0174532925199433 6.93889390390723e-18 0.0174532925199433
Columns 6 through 7
0.0349065850398866 0.0465421133865154

採用された回答

Star Strider
Star Strider 2020 年 7 月 21 日
Assuming that everything except ‘c’ is a scalar, it is still necessary to use element-wise operations to calculate ‘d’.
Try this:
d = N.*cos(prr).*log(tan(pi/4+c/2).*((1-e*sin(c))./(1+e*sin(c))).^(e/2));
See Array vs. Matrix Operations for an extended discussion.
.
  2 件のコメント
Tamia Eli
Tamia Eli 2020 年 7 月 21 日
Thank you so much it worked!
Star Strider
Star Strider 2020 年 7 月 21 日
As always, my pleasure!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by