MATLAB: How to define the value of “t” from function f(t)

functions in matlab

Hello,
I have a function
f(t)=exp(-0.01*t.^2).*cos(2.*t)
where 't' is a function handle (f=@t)
I need to define 't' when f(t)=0.4.
How do I do this?
Sergey

Best Answer

It sounds to me like you might be attempting to solve exp(-0.01*t.^2).*cos(2.*t) to find the t where the expression becomes 0.4 . If so then there are an infinite number of solutions. You can find one of them by using
syms f(t)
f(t) = exp(-0.01*t.^2).*cos(2.*t);
vpasolve(f(t)=0.4)