MATLAB: Matrix operation with equation.

matricesmatrixmatrix manipulation

I have a matrix (5×1) I = [-6;-5;9;-7;-3]; How to perform calculation in MATLAB command window for each value in this matrix, the equation is A(I) = 1/(1+e^-I), where I = -6, -5, 9, -7, and -3. and return the answer in matrix form (5×1). Thanks.

Best Answer

A = 1./(1+exp(-I));