applyting function to all elements in a matrix
古いコメントを表示
What is1./(1+exp(-z)), (z can be a matrix ) and how is it different from 1/(1+exp(-z))?
2 件のコメント
Vladimir Sovkov
2019 年 12 月 30 日
The second version is a little bit strange, although without formal errors. The thing is that exp(-z) is per-element, i.e., it computes the matrix, whose every element is the exponent of the corresponding element of the initial matrix, while the operation / computes the matrix inversion. If you want all the operations to be done in the sense of the matrix algebra, you should use expm(-z). The first version is totally per-element, hence, it looks quite consistent.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!