applyting function to all elements in a matrix
Mostrar comentarios más antiguos
What is1./(1+exp(-z)), (z can be a matrix ) and how is it different from 1/(1+exp(-z))?
2 comentarios
Stephen23
el 30 de Dic. de 2019
Vladimir Sovkov
el 30 de Dic. de 2019
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.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!