Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Error in using int() !!!!
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Animesh Pandey  
View profile  
 More options Apr 16 2011, 10:18 am
Newsgroups: comp.soft-sys.matlab
From: "Animesh Pandey" <apanimesh...@gmail.com>
Date: Sat, 16 Apr 2011 14:18:05 +0000 (UTC)
Local: Sat, Apr 16 2011 10:18 am
Subject: Error in using int() !!!!
clc
syms t w
int(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));
H = int(f(t).*exp(-I*w*t), t, -Inf, Inf);
pretty(H);

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lisa Oziel  
View profile  
 More options Apr 16 2011, 1:28 pm
Newsgroups: comp.soft-sys.matlab
From: "Lisa Oziel" <Lisa_Oz...@yahoo.com>
Date: Sat, 16 Apr 2011 17:28:04 +0000 (UTC)
Local: Sat, Apr 16 2011 1:28 pm
Subject: Re: Error in using int() !!!!

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.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Animesh Pandey  
View profile  
 More options Apr 17 2011, 5:58 am
Newsgroups: comp.soft-sys.matlab
From: "Animesh Pandey" <apanimesh...@gmail.com>
Date: Sun, 17 Apr 2011 09:58:04 +0000 (UTC)
Local: Sun, Apr 17 2011 5:58 am
Subject: Re: Error in using int() !!!!

--------------------------------------------------------------------------- ----------------------------------
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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Steven_Lord  
View profile  
 More options Apr 18 2011, 11:42 am
Newsgroups: comp.soft-sys.matlab
From: "Steven_Lord" <sl...@mathworks.com>
Date: Mon, 18 Apr 2011 11:42:38 -0400
Local: Mon, Apr 18 2011 11:42 am
Subject: Re: Error in using int() !!!!

"Animesh Pandey" <apanimesh...@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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »