Write two vectors as convolutionExtremely large weighted averageHow can I use fast FFT-based convolution to implement a LPF if the fast convolution requires a LPF?Fast Convolution Output too big?Deconvolution of data convolved by a Gaussian responseSpeeding up Matlab DFTs with NAG functionsHow to downsample Fourier complex values?Recovering time function from its single-sided spectrum + its HermitianIFFT Matlab symmetric vs Java math commonsMatlab: fourier coefficients of sign() function are oscillatingWhen and how to do zero-padding for a discrete convolution?
How can Internet speed be 10 times slower without a router than when using the same connection with a router?
Why would a military not separate its forces into different branches?
How do I, as a DM, handle a party that decides to set up an ambush in a dungeon?
Make me a minimum magic sum
Is space itself expanding or is it just momentum from the big bang carrying things apart?
Sparring against two opponents test
Counting the Number of Real Roots of A Polynomial
Meaning of the (idiomatic?) expression "seghe mentali"
Should I simplify my writing in a foreign country?
What Kind of Wooden Beam is this
Why is "breaking the mould" positively connoted?
What is the closest airport to the center of the city it serves?
How to calculate rate of axial precession?
Krull dimension of the ring of global sections
Speed up this NIntegrate
Is any special diet an effective treatment of autism?
Looking for sci-fi book based on Hinduism/Buddhism
Gerrymandering Puzzle - Rig the Election
How can a hefty sand storm happen in a thin atmosphere like Martian?
Why does sound not move through a wall?
In linear regression why does regularisation penalise the parameter values as well?
Page count conversion from single to double-space for submissions
Why would one crossvalidate the random state number?
How to remap repeating commands i.e. <number><command>?
Write two vectors as convolution
Extremely large weighted averageHow can I use fast FFT-based convolution to implement a LPF if the fast convolution requires a LPF?Fast Convolution Output too big?Deconvolution of data convolved by a Gaussian responseSpeeding up Matlab DFTs with NAG functionsHow to downsample Fourier complex values?Recovering time function from its single-sided spectrum + its HermitianIFFT Matlab symmetric vs Java math commonsMatlab: fourier coefficients of sign() function are oscillatingWhen and how to do zero-padding for a discrete convolution?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
How to write two column vectors as an analytic convolution so that the discrete FFT may be used. MATLAB syntax is used.
Consider:
a set of vectors which, when sorted into a step function appears as any of the following:
[1,1,1,1,0,0,0,0]
, or[1,1,1,1,1,0,0,0]
, or[1,1,1,1,1,1,0,0]
(...the location at which the function "steps up" varies over members of this set)
The other is random
vec=[1,0,1,0,1,1,1,0]
, and obviously both contain only 0s and 1s.
Is it possible to write these vectors as an analytic convolution? I would like the 1st, 2nd, 3rd, 4th... entries of the convolution to have values of:
sum(vec.*[1,0,0,0,0,0,0,0])
sum(vec.*[1,1,0,0,0,0,0,0])
sum(vec.*[1,1,1,0,0,0,0,0])
sum(vec.*[1,1,1,1,0,0,0,0])
...
sum(vec.*[1,1,1,1,1,1,1,1])
For speed, I am trying to avoid use of a for-loop. I cannot vectorize because this requires terabytes of RAM. (I work with vectors that are not of length 8, but rather length nearly a million).
The convolution theorem gives the function R from the convolution of functions L and 1/w from the Fourier transform F and its inverse F-1 as,
Clearly, the function 1/(w-w') in the convolution is from 1/w under F; it's as if you just set w'=0. But if I use analogous reasoning in my [1,1,1,1,0,0,0,0]
, I get either [1,1,1,1,1,1,1,1]
, the identity under .*
in MATLAB or [0,0,0,0,0,0,0,0]
(a very boring result).
What is the mistake in reasoning I've made?
fft convolution
add a comment |
How to write two column vectors as an analytic convolution so that the discrete FFT may be used. MATLAB syntax is used.
Consider:
a set of vectors which, when sorted into a step function appears as any of the following:
[1,1,1,1,0,0,0,0]
, or[1,1,1,1,1,0,0,0]
, or[1,1,1,1,1,1,0,0]
(...the location at which the function "steps up" varies over members of this set)
The other is random
vec=[1,0,1,0,1,1,1,0]
, and obviously both contain only 0s and 1s.
Is it possible to write these vectors as an analytic convolution? I would like the 1st, 2nd, 3rd, 4th... entries of the convolution to have values of:
sum(vec.*[1,0,0,0,0,0,0,0])
sum(vec.*[1,1,0,0,0,0,0,0])
sum(vec.*[1,1,1,0,0,0,0,0])
sum(vec.*[1,1,1,1,0,0,0,0])
...
sum(vec.*[1,1,1,1,1,1,1,1])
For speed, I am trying to avoid use of a for-loop. I cannot vectorize because this requires terabytes of RAM. (I work with vectors that are not of length 8, but rather length nearly a million).
The convolution theorem gives the function R from the convolution of functions L and 1/w from the Fourier transform F and its inverse F-1 as,
Clearly, the function 1/(w-w') in the convolution is from 1/w under F; it's as if you just set w'=0. But if I use analogous reasoning in my [1,1,1,1,0,0,0,0]
, I get either [1,1,1,1,1,1,1,1]
, the identity under .*
in MATLAB or [0,0,0,0,0,0,0,0]
(a very boring result).
What is the mistake in reasoning I've made?
fft convolution
I think maybe you need to add some code to this, because I can't figure out what it is that you are trying to do. Yes, you can write any vector as a convolution of other vectors. What you describe withsum(vector.*[...])
looks to be justcumsum(vec)
, I'm not sure I understand what you're looking for. I also don't understand how the vectors you show relate to 1/w.
– Cris Luengo
Mar 23 at 4:06
add a comment |
How to write two column vectors as an analytic convolution so that the discrete FFT may be used. MATLAB syntax is used.
Consider:
a set of vectors which, when sorted into a step function appears as any of the following:
[1,1,1,1,0,0,0,0]
, or[1,1,1,1,1,0,0,0]
, or[1,1,1,1,1,1,0,0]
(...the location at which the function "steps up" varies over members of this set)
The other is random
vec=[1,0,1,0,1,1,1,0]
, and obviously both contain only 0s and 1s.
Is it possible to write these vectors as an analytic convolution? I would like the 1st, 2nd, 3rd, 4th... entries of the convolution to have values of:
sum(vec.*[1,0,0,0,0,0,0,0])
sum(vec.*[1,1,0,0,0,0,0,0])
sum(vec.*[1,1,1,0,0,0,0,0])
sum(vec.*[1,1,1,1,0,0,0,0])
...
sum(vec.*[1,1,1,1,1,1,1,1])
For speed, I am trying to avoid use of a for-loop. I cannot vectorize because this requires terabytes of RAM. (I work with vectors that are not of length 8, but rather length nearly a million).
The convolution theorem gives the function R from the convolution of functions L and 1/w from the Fourier transform F and its inverse F-1 as,
Clearly, the function 1/(w-w') in the convolution is from 1/w under F; it's as if you just set w'=0. But if I use analogous reasoning in my [1,1,1,1,0,0,0,0]
, I get either [1,1,1,1,1,1,1,1]
, the identity under .*
in MATLAB or [0,0,0,0,0,0,0,0]
(a very boring result).
What is the mistake in reasoning I've made?
fft convolution
How to write two column vectors as an analytic convolution so that the discrete FFT may be used. MATLAB syntax is used.
Consider:
a set of vectors which, when sorted into a step function appears as any of the following:
[1,1,1,1,0,0,0,0]
, or[1,1,1,1,1,0,0,0]
, or[1,1,1,1,1,1,0,0]
(...the location at which the function "steps up" varies over members of this set)
The other is random
vec=[1,0,1,0,1,1,1,0]
, and obviously both contain only 0s and 1s.
Is it possible to write these vectors as an analytic convolution? I would like the 1st, 2nd, 3rd, 4th... entries of the convolution to have values of:
sum(vec.*[1,0,0,0,0,0,0,0])
sum(vec.*[1,1,0,0,0,0,0,0])
sum(vec.*[1,1,1,0,0,0,0,0])
sum(vec.*[1,1,1,1,0,0,0,0])
...
sum(vec.*[1,1,1,1,1,1,1,1])
For speed, I am trying to avoid use of a for-loop. I cannot vectorize because this requires terabytes of RAM. (I work with vectors that are not of length 8, but rather length nearly a million).
The convolution theorem gives the function R from the convolution of functions L and 1/w from the Fourier transform F and its inverse F-1 as,
Clearly, the function 1/(w-w') in the convolution is from 1/w under F; it's as if you just set w'=0. But if I use analogous reasoning in my [1,1,1,1,0,0,0,0]
, I get either [1,1,1,1,1,1,1,1]
, the identity under .*
in MATLAB or [0,0,0,0,0,0,0,0]
(a very boring result).
What is the mistake in reasoning I've made?
fft convolution
fft convolution
edited Mar 23 at 4:02
Cris Luengo
24k62254
24k62254
asked Mar 23 at 2:19
ignoramusignoramus
81
81
I think maybe you need to add some code to this, because I can't figure out what it is that you are trying to do. Yes, you can write any vector as a convolution of other vectors. What you describe withsum(vector.*[...])
looks to be justcumsum(vec)
, I'm not sure I understand what you're looking for. I also don't understand how the vectors you show relate to 1/w.
– Cris Luengo
Mar 23 at 4:06
add a comment |
I think maybe you need to add some code to this, because I can't figure out what it is that you are trying to do. Yes, you can write any vector as a convolution of other vectors. What you describe withsum(vector.*[...])
looks to be justcumsum(vec)
, I'm not sure I understand what you're looking for. I also don't understand how the vectors you show relate to 1/w.
– Cris Luengo
Mar 23 at 4:06
I think maybe you need to add some code to this, because I can't figure out what it is that you are trying to do. Yes, you can write any vector as a convolution of other vectors. What you describe with
sum(vector.*[...])
looks to be just cumsum(vec)
, I'm not sure I understand what you're looking for. I also don't understand how the vectors you show relate to 1/w.– Cris Luengo
Mar 23 at 4:06
I think maybe you need to add some code to this, because I can't figure out what it is that you are trying to do. Yes, you can write any vector as a convolution of other vectors. What you describe with
sum(vector.*[...])
looks to be just cumsum(vec)
, I'm not sure I understand what you're looking for. I also don't understand how the vectors you show relate to 1/w.– Cris Luengo
Mar 23 at 4:06
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55309995%2fwrite-two-vectors-as-convolution%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55309995%2fwrite-two-vectors-as-convolution%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I think maybe you need to add some code to this, because I can't figure out what it is that you are trying to do. Yes, you can write any vector as a convolution of other vectors. What you describe with
sum(vector.*[...])
looks to be justcumsum(vec)
, I'm not sure I understand what you're looking for. I also don't understand how the vectors you show relate to 1/w.– Cris Luengo
Mar 23 at 4:06