Sunday, November 25, 2018

FFT-like algorithm for fast DTFT computation?



Good morning!


I'm coding up a project on a microcontroller to read in some analog audio (specifically, the sound of someone whistling: a near perfect sine wave) and determine which piano note tones are present in the signal.


Although the FFT is the obvious first choice, the frequencies I wish to detect in the signal don't line up with the FFT frequencies. Furthermore, I only want to detect around 10-15 frequencies, not the whole spectrum.


So my thoughts quickly turn to the DTFT, which can be implemented with a matrix multiplication (here is my prototype MATLAB code. Details provided on request). However, surprisingly, it still takes more computation than an entire FFT!


This brings me to my question. I've made all the obvious google searches ("fast DTFT", "FFT for specific frequencies") without much luck. Does anyone here know of an efficient DTFT method?




rambam - How would the splitting of the sea have been done with magic if magic is just trickery?


In the spirit of the recent Mi Yodeya discussion of the Rambam's view of magic, a question that has bothered me for some time:


The Rambam ostensibly doesn't accept that there is any reality to magic, everything is done through slight of hand and trickery, and the Torah's prohibition is against exactly that trickery. (See here for more on that.)


However, in Yesodei HaTorah 8:1 the Rambam writes that Moshe would not have been relied upon absolutely due to any of the wonders he performed, because they could have been done through magic:



משה רבינו לא האמינו בו ישראל מפני האותות שעשה. שהמאמין על פי האותות יש בלבו דופי שאפשר שיעשה האות בלט וכשוף.


The Jewish people did not believe in Moshe Rabbeinu as a result of the wonders that he performed, for one who believes according to wonders always has some doubt in his heart, maybe it was done through magic.



The Rambam then procedes to give examples of some of those miracles which were not done to produce belief. All the examples seem difficult to pull off as a slight-of-hand trick, but here's just one:




היה צריך להשקיע את המצריים קרע את הים והצלילן בתוכו


He needed to drown the Egyptians, so he split the sea and sunk them in it



If magic is fake, how could these things have possibly been performed through "magic"?




kiruv outreach - How to convince your Jewish athiest friend to become shomer mitzvot?



If one has a friend who's and atheist--someone who believes in evolution, big bang, etc--what methods can you use to convince him to abandon his old ways and start keeping some of the mitzvot?


Bible codes can be chalked up to coincidence. Proofs from the laws of the kashrut can be said to be generalized and not conclusively proven. Predictions prophesied can be retorted by saying that if you look for something in such a vast collection of texts anything could be found. If you try to suggest torah lectures for them to watch, they will say that they don't have an hour to listen to nonsense.


Granted atheism can be used as a device to rationalize not following the Torah or God, can any method in particular penetrate this particular mindset?



Answer



One of my teachers at KBY told me the following story:



A chossid went to his rebbe and asked for a segula for his son to grow up to be a talmid chochom.
The rebbe said "Go, sit down, and learn."
"I'm sorry, rebbe, I didn't say that clearly enough. I'm looking for a segula for my son to be a talmid chochom."
"Go, sit down, and learn."

"But rebbe, I'm not asking for myself; I'm asking for my son!"
Finally, the rebbe explained, "Don't you understand? The most important thing you can possibly do to get your son to devote himself to learning Torah and becoming a talmid chochom is to do that yourself. Your example is the most powerful influence you have on him."



I think this principle applies to influencing friends, as well. The most powerful tool you have for inspiring others toward belief in God and observance of His Torah is to strengthen your own belief and observance as much as possible. You probably don't have a connection with your friends like a father has with his son, but to the degree that you are able to maintain a relationship of mutual love and respect, your friend will have a chance of being influenced by your example.



טוב לצדיק טוב לשכינו
Good for the righteous one; good for his neighbor.



Abbaye, Sukka 56b


halacha - changing one's Hebrew name


Sometimes a sick person changes his Hebrew name or adds to it.


Is there a problem (halachically or otherwise) with changing one's Hebrew name, for someone who is not sick? For example, he prefers a different name for whatever reason.


I am especially interested in halachic problems with this.



Answer



According to the Halacha a person has the right to change his name to whatever he or she likes.


But the Minhag is not to do so without a valid reason, and only after consulting a prominent Rabbi, due to many complications that could arise in result of that, and for other reasons as well.


source: Kobetz Ginas Verdimenter image description here



Saturday, November 24, 2018

halacha - Are "clickbait" links permissible?


Wikipedia defines "clickbait" as follows:



Clickbait is a pejorative term describing web content that is aimed at generating online advertising revenue, especially at the expense of quality or accuracy, relying on sensationalist headlines to attract click-throughs and to encourage forwarding of the material over online social networks. Clickbait headlines typically aim to exploit the "curiosity gap", providing just enough information to make the reader curious, but not enough to satisfy their curiosity without clicking through to the linked content.




Is it permissible to use this sort of technique in ads, social media posts, etc., to drive traffic to one's content?


I expect that the main issue would be, to the degree that it's present, tricking people through false representation of what's on the other side of the link. If that's the case, are there guidelines about how to determine what's too dishonest that could apply here?




hashkafah philosophy - How to go about finding a personal Rav


The mishna in Avot (1:6) tells us:



יהושוע בן פרחיה וניתאי הארבלי קיבלו מהם. יהושוע בן פרחיה אומר, עשה לך רב, וקנה לך חבר; והוי דן את כל האדם לכף זכות




When living in different areas I have gone about this in different ways. Having moved to Israel I have struggled finding a personal Rav. Relying on Rabbeim that I had in my previous country of residence is not an option since many minhagim are different, as are the specific laws of the land, and (in particular) very current issues relating to kashrut.


I know many that rely on their Rabbeim from their time in yeshiva; I don't feel that I those connections are the correct ones for me.


I am looking for advice or experience that could help a person in this process.




grammar - Can ごとに be replaced by それぞれ in this question?


正月は家ごとに門松を立てる。



For example, could I say


正月はそれぞれの家に門松をたてる。


If so, the meaning remains the same, or are there any subtle nuances that comes with each word? It seems to me, whenever i see sentences with either words, that sometimes they can be interchangeable and sometimes it just seems weird replacing one with the another. More specifically, some sentences with ごとに could be rewritten using the pattern それぞれの (which in this case acts as a pronoun), for example:


木村さんは会う人ごとに挨拶している。 -> 木村さんはそれぞれの会う人に挨拶している。 Is the second sentence above by any chance correct?




digital communications - Understanding the Matched Filter

I have a question about matched filtering. Does the matched filter maximise the SNR at the moment of decision only? As far as I understand, ...