The 'H' is coming out to be NaN.
'a' is a constant .....
'H' is basically the Fourier Transform of f(t).
If f(t) = heaviside(t+0.5*a) - heaviside(t-0.5*a), then it works fine .....
I don't know where I am going wrong !!??
Please help !!!
THanx
Are you sure I=sqrt of -1 and when you use the pretty function you just need f same for int use int(f) . The reason for it because you defined t as your variable. Also you have the variable a defined right? Sqrt of negative n umber would get you an imaginary number. Other than that I do not see anything wrong with your code.
-------------------------------------------------------------------------------------------------------------
Pretty(H) does not give any error if I replace 'a' by an integer.
But I want 'H' to be general.
'H' is basically the Fourier Transform of f(t).
clc
syms t w a
I = sqrt(-1);
f = @(t) 0.5*(((t+0.5*a)./abs(t+0.5*a)) - ((t-0.5*a)./abs(-t+0.5*a)));
pretty(f(t)); %gives correct plot
H = int(f(t).*exp(-I*w*t), t, -Inf, Inf);
pretty(H); %NaN
"Animesh Pandey" <apanim...@gmail.com> wrote in message
news:ioc8et$9g6$1...@fred.mathworks.com...
Do NOT keep starting new threads for the same or extremely similar
questions!
http://www.mathworks.com/matlabcentral/newsreader/view_thread/306361
http://www.mathworks.com/matlabcentral/newsreader/view_thread/306346
http://www.mathworks.com/matlabcentral/newsreader/view_thread/306320
http://www.mathworks.com/matlabcentral/newsreader/view_thread/306282
http://www.mathworks.com/matlabcentral/newsreader/view_thread/305989
Please choose ONE thread and continue the discussion in THAT ONE thread.
--
Steve Lord
sl...@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com