Array Operations give me a constant

9 ビュー (過去 30 日間)
Gregory Grozdanis
Gregory Grozdanis 2022 年 6 月 7 日
コメント済み: Gregory Grozdanis 2022 年 6 月 7 日
I defined a variable FQB as 0:0.01:1 but when I use this I get a FQE as a single constant despite using FQB to define it.
x is an array but logitx is somehow a constant as well. What am I doing wrong? I am trying to plot FQB vs FQE
D0 = 100;
D1 = 80;
D2 = 80;
HD = 0.4;
A = -6.96*log(D1/D2)/D0; % A is 0 for symmetric bifurcations
B = 1 + 6.98*(1-HD)/D0;
X0 = 0.4/D0;
FQB = 0:0.01:1;
x = (FQB-X0)/(1-2*X0);
logitx = log(x/(1-x));
FQE = 1/(1+exp(-(A+B*logitx)))
FQE = 0.3206

採用された回答

Torsten
Torsten 2022 年 6 月 7 日
編集済み: Torsten 2022 年 6 月 7 日
D0 = 100;
D1 = 80;
D2 = 80;
HD = 0.4;
A = -6.96*log(D1/D2)/D0; % A is 0 for symmetric bifurcations
B = 1 + 6.98*(1-HD)/D0;
X0 = 0.4/D0;
FQB = 0:0.01:1;
x = (FQB-X0)/(1-2*X0);
logitx = log(x./(1-x));
FQE = 1./(1+exp(-(A+B*logitx)));
size(FQE)
ans = 1×2
1 101
  1 件のコメント
Gregory Grozdanis
Gregory Grozdanis 2022 年 6 月 7 日
Thank you!

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by