フィルターのクリア

Is there any function can compute the value of sgn?

3 ビュー (過去 30 日間)
Sarah A
Sarah A 2018 年 8 月 8 日
コメント済み: Star Strider 2018 年 8 月 9 日
Hello,
I read in a paper the following : sgn(A.B), where A and B are vectors. So what does that mean and is there any built in function that can do that? note that sgn is the sigmoid.
Regards,

採用された回答

Star Strider
Star Strider 2018 年 8 月 8 日
The closest you can lkikely get is the sigmf (link) function in the Fuzzy Logic Toolbox.
You can easily write your own:
sgn = @(x,a,c) 1./(1 + exp(-a.*(x-c))); % Create Function
x = 0:0.1:10;
y = sgn(x, 2, 4);
plot(x,y)
xlabel('sigmf, P = [2 4]')
ylim([-0.05 1.05])
This plot matches the one in the documentation.
Experiment to get the result you want.
  2 件のコメント
Sarah A
Sarah A 2018 年 8 月 9 日
Thank you for your answer. could you please explain to me what are a and c ?
Star Strider
Star Strider 2018 年 8 月 9 日
As always, my pleasure.
They are scaling constants for the membership function.
This may not be the version you want, however. If you have a description of your function and the arguments, and the context in which you are using it, we can get closer to creating it. There appear to be several versions of the sigmoid function.

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by