Skip to main content
1-Visitor
January 23, 2019
Solved

Sampling a conditional function for DFT not working

  • January 23, 2019
  • 1 reply
  • 1619 views

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?

Best answer by LucMeekes

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

1 reply

LucMeekes23-Emerald IVAnswer
23-Emerald IV
January 23, 2019

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

Pixel1231-VisitorAuthor
1-Visitor
January 23, 2019

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