WOLFRAM COMMUNITY
Connect with users of Wolfram technologies to learn, solve problems and share ideas
Join
Sign In
Dashboard
Groups
People
Message Boards
Answer
(
Unmark
)
Mark as an Answer
WOLFRAM COMMUNITY
Dashboard
Groups
People
0
|
6047 Views
|
1 Reply
|
0 Total Likes
View groups...
Follow this post
Share
Share this post:
GROUPS:
Signal Processing
Mathematica
Wolfram Language
Filtering Data
sean roubion
sean roubion
Posted
11 years ago
I have taken a DFT of some data points I called "v" which was a 193 data points.
a = Fourier[{v}, FourierParameters -> {1, 1}];
The Fourier returned a 193 data points. As it turned out, I don't need all of them. In the output, how can tell Mathematica to index points 90 to a 105 to be 0? In other words, instead of having to painstakingly count and find out which points are between 90 and 105, Mathematica does it automatically sets them to 0.
Thank you in advance.
POSTED BY:
sean roubion
Reply
|
Flag
1 Reply
Sort By:
Replies
Likes
Recent
0
Girish Arabale
Girish Arabale
Posted
11 years ago
You can write-
In[4]:= b = ReplaceList[Take[a[[1]], {90, 105}], {x__, ___} -> 0]
Out[4]= {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
And then,
Join[Take[a[[1]], 89], b, Take[a[[1]], {106, 193}]]
to get the list.
POSTED BY:
Girish Arabale
Reply
|
Flag
Reply to this discussion
in reply to
Add Notebook
Community posts can be styled and formatted using the
Markdown syntax
.
Tag limit exceeded
Note: Only the first five people you tag will receive an email notification; the other tagged names will appear as links to their profiles.
Publish anyway
Cancel
Reply Preview
Attachments
Remove
Add a file to this post
Follow this discussion
or
Discard
Group Abstract
Be respectful. Review our
Community Guidelines
to understand your role and responsibilities.
Community Terms of Use
Feedback