필터 지우기
필터 지우기

Logistic Function Transform of vector values

조회 수: 18 (최근 30일)
Oddur Bjarnason
Oddur Bjarnason 2017년 7월 11일
댓글: emjey 2018년 8월 16일
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일
Matrix dimensions must agree. Add dot before division ( / ):
S1=(1./(1 + exp(1).^(-1*Stemp)))

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by