Fraction of the Equations

1 回表示 (過去 30 日間)
Hege
Hege 2020 年 6 月 25 日
コメント済み: John D'Errico 2020 年 6 月 25 日
I have to write two functions and second function is based on fraction of two equations developed in the first function.
b(i,j,k)=1 and sometimes b(i,j,k)=0 which depends on my parameters in the first function. I need a calculate the ratio of the sum of b(i,j,k)=1 and sum of b(i,j,k)=0. Appreciate your comments.
  2 件のコメント
Aditya Verma
Aditya Verma 2020 年 6 月 25 日
編集済み: Aditya Verma 2020 年 6 月 25 日
What do you mean by ratio of b(i,j,k)=1 and b(i,j,k)=0? And b(i, j, k) is binary valued function?
John D'Errico
John D'Errico 2020 年 6 月 25 日
So what help do you expect? You need to write two functions. That part seems easy.
You have an array that is apparently supposed to be 1 some of the time and 0 the rest. At least, some of the time. OK. We know all we need now. Except that all of this depends on some unspecified parameters, in some unspecified way.
Then you want to compute some ratio of the sum of elements equal to 1, and the sum of elements equal to 0. Since the sum of a lot of zero elements is still zero, the ratio will be 1/0 --> inf.
Or, maybe you want to kow how MANY zeros and 1s there are. Easy enough.
Seems clear as mud to me. Where exactly do you need help on this?
Seriously, if you want help, you need to explain what you are doing.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by