exponential - How to represent e^(-t^2) in MATLAB? -
i beginner in matlab, , need represent e(-t2).
i know that, example, represent ex use exp(x)
, , have tried following
1) tp=t^2; / tp=t*t; x=exp(-tp);
2) x=exp(-t^2);
3) x=exp(-(t*t));
4) x=exp(-t)*exp(-t);
what correct way it?
if t
matrix, need use element-wise multiplication or exponentiation. note dot.
x = exp( -t.^2 )
or
x = exp( -t.*t )
Comments
Post a Comment