I need to transform the elements of a vector by a logistic function into a vector with elements with values between 0 and 1. I have tried:
S1=(1/(1 + exp(1).^(-1*Stemp)))
S1 and Stemp are vectors containing the same elements.
But get the error message:
Error in Fuzzylogic_cognitive_map (line 13) S1=(1/(1 + exp(1).^(-1*Stemp)))

1 件のコメント

emjey
emjey 2018 年 8 月 16 日
or simply (with Grzegorz correction) S1=(1./(1 + exp(-Stemp)))

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

 採用された回答

Grzegorz Knor
Grzegorz Knor 2017 年 7 月 11 日

0 投票

Matrix dimensions must agree. Add dot before division ( / ):
S1=(1./(1 + exp(1).^(-1*Stemp)))

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Statistics and Machine Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by