cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Sampling a conditional function for DFT not working

Pixel123
3-Newcomer

Sampling a conditional function for DFT not working

Hello everyone,

 

I would like to sample a half sine, so I made a conditional function which represents the halve sine. It plots perfectly. However when I try to sample it, it does not work the same anymore as the regular sine function, and therefore I cannot get the DFT.


Any Ideas?

ACCEPTED SOLUTION

Accepted Solutions
LucMeekes
23-Emerald III
(To:Pixel123)

Due to the multiplication with the condition, the result in f1 is no longer a vector.

You should vectorize the multiplication, to get a vector as result.

 

See attached.

 

Success!
Luc

View solution in original post

2 REPLIES 2
LucMeekes
23-Emerald III
(To:Pixel123)

Due to the multiplication with the condition, the result in f1 is no longer a vector.

You should vectorize the multiplication, to get a vector as result.

 

See attached.

 

Success!
Luc

Thank you very much Sir. Feel a bit stupid that I missed this! Will definitely remember this now.

Announcements

Top Tags