フィルターのクリア

How to work the Mean function

6 ビュー (過去 30 日間)
Andras Gergely
Andras Gergely 2019 年 8 月 8 日
コメント済み: Stephen23 2019 年 8 月 8 日
Hi Everone,
I have a question in relation to the .
I fed into the MAtlab 2019a a simple instruction, i.e., mean of two variables (example underneath) and it would not solve it anyway
imean1=mean(abs(i_min_1(1,1)),i_max_1(1,1));
If I use it in a translated mathematical formula like underneath:
imean1=(abs(i_min_1(1,1))+i_max_1(1,1))/2;
then it works flwalwssly and very fine proceed with calculation.
Please let me know what could go wrong with it.
Many thanks in advance.
Andras

採用された回答

Adam
Adam 2019 年 8 月 8 日
doc mean
shows you the syntax of the mean function. It expects an array, not multiple arguments. Generally you take the mean of more than 2 inputs so having them as individual arguments would not be sensible.
mean( [ abs(i_min_1(1,1)),i_max_1(1,1) ] );
should work.
  1 件のコメント
Stephen23
Stephen23 2019 年 8 月 8 日
Andras Gergely's incorrectly accepted "Answer" moved here:
Thanks Adam.
I followed a different synthax to solve my issue but this is one also works.
By now it is clear.
Many thanks for that.

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

その他の回答 (1 件)

Andras Gergely
Andras Gergely 2019 年 8 月 8 日
Thanks MAdhan RAvi!
Best wishes. :)

カテゴリ

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

タグ

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by