Thursday, October 31, 2019

Why is NH3 a stronger base than PH3,AsH3,SbH3,BiH3 and McH3?




I know that the orbitals of nitrogen overlap better with the 1s orbitals of hydrogen and that the orbitals of moscovium overlap worse with the 1s orbitals of hydrogen, but I don't know how to use this information to say why ammonia is stronger than $\ce{PH3}$,$\ce{AsH3}$,$\ce{SbH3}$,$\ce{BiH3}$ and why moscovium is weaker than $\ce{PH3}$,$\ce{AsH3}$,$\ce{SbH3}$,$\ce{BiH3}$




organic chemistry - Protonation of compounds with two or three neighboring nitrogens



I am working with organic compounds. Many of them are similar to this ones:


Molecules


The R group (which I paste for completeness) is:


R-group


I am a bit confused about the protonation state of those amine-compounds at pH=7.4, in aqueous solution.


N-substitued amines are more basic than the other ones. For example methylamine is more basic than ammonia. But the protonation state of the ring is more complex than that, and I can't understand how to protonate it.


I suppose that in a kind of analogy with the guanidine (product) we could protonate again the double bonded nitrogen (imine).


Will amine be protonated? Will that compound has $+2$ charge?


Guanidine


It will possibly be protonated in the double bounded nitrogen, because it has more negative density charge and resonation is not broken. Any other point of view will be welcome.





non linear - Precisions on Hilbert Huang transform


After investigating signal analysis methods based on empirical mode decomposition (EMD), I found that recent developments are mostly related to the Hilbert Huang transform (HHT) and the Local Mean Decomposition (LMD) method.


I have been reading a few articles on the subject and I would like to have your opinion regarding HHT.


EMD leads to intrinsic mode functions that are particularly well suited for Hilbert transform. HHT seems to be really widely used for many distinct types of industrial or academic applications.


Am I right to think that HHT is essentially EMD + Hilbert transform? Do you consider the specificity of the HHT lies in the sifting process based on spline interpolation (to the contrary of the LMD using a moving average algorithm for instance)?




rambam - Miracles through natural means


I've heard it said that both Ramban and Rambam believed that Hashem causes miracles to occur through natural means, but I've never seen this. What exactly do they (and other significant Rabbonim) say about this?


I've always understood this to mean that the event itself was something that did not contravene the laws of science, but
a) it may have been very unlikely to occur and
b) the fact that it occurred exactly at the right time were what made it miraculous. Is this what they meant or am I misunderstanding something?




grammar - The difference among ずに、ず、ないで、なくて



I know they are all the negative form of a verb, but I just don't know the difference. I still remember when I was learning Japanese, my teacher told me that ずに equals ないで in a more ancient way, but what about the other two? When should I use ないで, and when should I use なくて? And how about ず? Thank you.




smell - Why is there no blessing on smelling tasty food that's cooking or baking?


AFAIK, the only "smelly" bracha we make is when smelling spices. good smelling twigs and good smelling fruit. It seems that the bracha should be made on "raw" items, only.


Apparently, the sages instituted a bracha for smelling something "nice", but whay was this limited to just raw items. The concept of birkat hanehenin is that you should make a blessing before you "enjoy" or "benefit" from something, with smell being one of the senses used for such "enjoyment".



So, if I enjoy the smell of goat curry (assume that my butcher sells me kosher goat in the NYC area), and I know and recognize the smell of turmeric and cloves when they are cooking, why is there no bracha for that smell?




reference request - Book recommendations on DSP, statistical SP and signal detection


I am looking for a good reference on DSP. I am a little bit more than beginner and have some experience in DPS. I think I would have to start with rather easier books where a concept of DSP is explained based on practical examples, intuitively.


Eventually I'd take more advanced books to have solid understanding of DSP, including statistical signal analysis such as power spectra, cross-spectra, coherence, autocorrelation, and cross-correlation and ultimately I'd be interested in signal, sound, noise, or speech detection.


For beginners, people recommend



All recommendations of advanced books are by Alan V. Oppenheim's e.g.:




  • Alan V. Oppenheim, Ronald W. Schafer, John R. Buck, Discrete-Time Signal Processing, Prentice-Hall Signal Processing Series.

  • Alan V. Oppenheim, Alan S. Willsky, with S. Hamid, Signals and Systems, Prentice Hall


There was one more recommendation:



  • John G. Proakis, Dimitris K Manolakis, Digital Signal Processing: Principles, Algorithms and Applications, Prentice Hall


These books are usually quite expensive which is fine but I would not like to buy something I'd be disappointed with. If you could recommend or say whether the books I listed are worth the price, I'd be grateful :)


Thanks.





EDIT.

I have decided to buy and go through "Understanding Digital Signal Processing" by Rick Lyons. I am still waiting for it but have had a chance to read through first two chapters via Kindle App. I must say I am already happy and don't regret this purchase. I'd recommend this book for all starters.




Wednesday, October 30, 2019

physical chemistry - What is the correct way to calculate the rate constant for the reaction of NO and O2?



The following data are given for the reaction of $\ce{NO}$ and $\ce{O2}$:


$$ \ce{2NO + O2 -> 2NO2} $$



The the reaction is second order in $\ce{[NO]}$ and first order in $\ce{[O2]}$, and the rate of disappearance of $\ce{NO}$ is $2.5 \times 10^{-5}~\mathrm{mol\over L\,s}$ at the instant when $\ce{[NO] = [O2]} = 0.01~\mathrm{mol\over L}$.


The question asks me to calculate the rate constant.


I've thought of two ways of approaching the calculation—which of these solutions is correct?


1) Take the rate of the reaction as one-half the rate of disappearance of $\ce{NO}$:


$$ \begin{align} R &= {1\over 2} * 2.5 \times 10^{-5} = k \ce{[NO]^2[O2]}=k(0.01)^3 \\ k &= 12.5~\mathrm{L^2\over mol^2\,s} \end{align} $$


2) Take the rate of the reaction as equal to the rate of disappearance of $\ce{NO}$:


$$ \begin{align} R &= 2.5 \times 10^{-5} = k \ce{[NO]^2[O2]} = k(0.01)^3 \\ k &= 25 ~\mathrm{L^2\over mol^2\,s} \end{align} $$




notation - How are lowercase k and uppercase K used in general chemistry courses?



Where do lowercase k and uppercase K make appearances in general chemistry, and what do they signify?



Answer



In addition to the original answer I also allowed myself to invite lowercase Greek letter kappa κ to the table as typographically it has a similar-looking appearance and add some more definitions:


Lowercase k




Uppercase K



Lowercase Greek letter kappa κ



Uppercase Greek letter kappa Κ



Both lowercase k and lowercase Greek letter kappa κ



Both lowercase k and uppercase K




  • $k$ and $K$ is in general may refer to a coefficient (German "Koeffizient"); indices are often used to denote which one, e.g. mass transfer coefficient $k_\mathrm{d}$, octanol/water partition coefficient $K_\mathrm{ow}$.


matlab - FFT method input argument have to be $2^n$ ?


Does FFT method input argument have to be power of 2, i.e, $2^n$
I just realized there are many algorithm for FFT implementation, is there any algorithm that takes arbitrary amount of samples as input argument?
if yes, what is their advantages amongst each other? namely, what algorithm does Matlab apply?




halacha - use the bathroom as a changing room


from shulchan aruch orach chaim 2 mishna brura there


and shulchan aruch orach chaim 239.2


(davka feldheim translation



2: THE LAW REGARDING PUTTING ON CLOTHES mishna berura 1. "...For this reason, one must likewise take care always, when not compelled /to do otherwise/, to avoid exposing even a little of any of his flesh which is normally kept covered by clothing all the time..." 2. "I.e., when he gets up and emerges from underneath the covering of his sheet, where he was lying naked after having removed his undershirt..."


239: THE LAW WITH RESPECT TO /THE READING OF/ KERIAS SHEMA BEFORE /GOING TO/ BED 2 When one takes off his undershirt, he should not turn it around /at the bottom and lift it/ upwards from below, since if /he does/ so his body will become naked. Instead, he should slide it off over his head, /after/ having covered himself underneath /the undershirt/ with his bedclothes /beforehand/, and /thus/ get into bed.)


it seems that what is normally kept covered by clothing should not be unclothed unless no choice and that a sheet is considered covered (clothed)


if i want to change my clothing during the day


can i use a bathroom as a covering wile i change my clothing? or do i need to go under a sheet?


{edit} can i use a Portable Changing Room? dose it also need to cover on top?


PS i understand about AYLOR but i am looking for sources




nuances - What is the most natural way to refer to someone when you don't know their name and don't have a close relationship with them?


I wanted to mention to a female staff member in a shop that I visit every day that I had seen their photograph in the Shibuya shop. I was going to say:


渋谷店であなたの写真を見た。


..but あなた seemed too intimate. If I knew their name, I could have said, for example:


渋谷店で田中さんの写真を見た。


..also きみ seemed too casual.


渋谷店で君の写真を見た。


What is the most natural way to refer to someone when you don't know their name and don't have a close relationship with them?




vocabulary - Historical differences between colors that are i-adjectives and those that are simply nouns


EDIT: Started a bounty with hope of getting more definitive and elaborate answers, e.g. timeline of when color names started being used in Japan.


In Japanese language, there are colors that are i-adjectives: 青い, 赤い, 黒い, 白い etc.


Then there are colors that are original nouns: 緑 {みどり}, 紫 {むらさき} etc.


And finally color nouns that are made of [something]-色: 茶色 {ちゃいろ}, 黄色 {きいろ} , 灰色 {はいいろ}, 桃色 {ももいろ}, 銀色 {ぎんいろ} etc.


Why are there different word classes for colors in Japanese? Is it because they have different historical backgrounds and etymologies?



Answer



Surprisingly, I wasn't able to find much information on this outside Wikipedia, even though it's popular trivia in Japan, but here's data from a book about color names:



In China circa 1000 BCE, the only kanji evidenced is white. By 820 BCE, this grows to white, yellow, orange-red, and green-blue-black. In 770, 赤 is no longer used for orange. In 750, 青 is invented for green-blue, and by 720 緑 is invented for green and 黒 for pitch black.


So much for the use of kanji, which presumably had strong influence on Japan when they were imported in the first millennium AD. What about Japan's native words? According to Wikipedia, they are the following:


Aka(赤)which shares an origin with "akarusi" (bright), "ake-/aku" (open), "akaaka to" (brilliantly/flaming) etc.


Kuro(黒)which shares an origin with "kurasi" (dark), "kure-/kuru" (darken/end) etc.


Siro(白)which shares an origin with "sirusi" (mark), "siru" (knowledge), "sirasira to" (obvious speech). Apparently the original word is Old Japanese "sirusi".


Awo(青)which shares an origin with "awi", the plant indigo, and which is claimed to be the antonym of siro.


Therefore, it is claimed, ancient Japanese had four colors: light-warm, dark-cool, distinct, and indistinct. In the transition to medieval Japanese, light became red, dark became black, distinct became white, and indistinct became blue-green. These comprise the four i-adjective colors.


The origin of midori is unknown.


Later, as another commentator said, "iro" was added to words to mean "the appearance of tea" etc., and later still color words were borrowed outright from English. 黄色, yellow, comes from the appearance of sprouts.


For more information, Wikipedia has some book recommendations at the bottom of its color names page.



plurals - Pluralization in Japanese: usage of -たち and -ら


I know that -たち and -ら pluralize the nouns they come after (or indicate a group that the noun is part of), but most of the time the plural in Japanese is implicit. When is it appropriate or necessary to use -たち or -ら?


(Bonus question: is there any difference except formality between -たち and -ら?)




words - Why use 数年 in あれから10数年?


My question is on 「あれから10数年」. My understanding is that this translates to roughly, "It's been 10 years since then."


The dictionary says「数年」 means "several years" or "a number of years". How does the meaning differ from「あれから10年後」, and why would you use 「数年」when using a specific number?



Answer




あれから10数年




It means 10 plus several years passed. like 14 to 17 years. 10 to 19 years passed. (corrected)



あれから10年後



It means exactly 10 years later.


すう‐ねん【数年】



2、3か5、6ぐらいの年数。




source: デジタル大辞泉


じゅう‐すう〔ジフ‐〕【十数】



[語素]単位を表す語の上に付いたり、助数詞を伴ったりして、それが10以上20未満であることを表す。「―メートル」「―人」



source: デジタル大辞泉


chasidut hasidism - Special occasions where various Chassidim don't say Tachanun


Various Chassidim have different customs regarding special occasions where they don't say Tachanun.


[I know this because sometimes I daven in a Vishnitz shule and, upon asking why they didn't say Tachanun one Chassid answered that it was a special day for Vishnitz (I forgot what exactly... maybe a Yartzeit of a Rebbe)]


For instance Chabad chassidim don't say Tachanun on a day where one of the Chabad Rebbeim was released from prison. (= Yom HaGeulah) [see Sefer HaMinhagim p16, Hayom Yom 19th Kislev, 12th Tamuz and 13th Tamuz (search for the word 'Tachanun')]


What special days/occasions do other branches of Chasiddim have on which they don't say Tachanun?



Answer



Most Chassidic Groups:1



  • On the yahrtzeit of a rabbi with connection to the group (either a previous rebbe, or someone with substantial influence on the group or that town's inhabitants).

  • When their rebbe does, e.g. when his child gets married or is circumcised.


  • On days when special joyous events happened to their past rebbes, e.g. they were freed from prison or concentration camp, or a decree affecting them was abolished.


Zionists:



  • On Yom HaAtzma'ut.3


Anti-Zionists:



  • Do say tachanun on on Yom HaAtzma'ut, even if there would be reasons not to say. a) 4



Munkatch:5



  • If there is a circumcision anywhere in that town (common custom is only that synagogue).

  • By Mincha.b)


Satmar:



  • On Fridays.4


Viznitz:6




  • On Erev Rosh Chodesh if it is after the molad.

  • Reb Mendel's chassidim by Mincha, even though it is always before sunset.c)


Zidichov:8



  • From Rosh Chodesh Adar I until seven days after Shavuos.

  • Whenever there can be found a reason (e.g. Mincha, Yahrtzeit,...).


Shotz:8




  • By Mincha.




Notes:


a) The current Belz​er rebbe himself steps out of his own synagogue to say tachanun alone, if his synagogue omits it by a bris milah. This is even though he is the sandak and mohel and normally would not say tachanun, even in a minyan other that where the bris takes place.2
b) Lev Tahor says tachanun by Mincha, even though they use the Munkatch​er siddur.1
c) Reb Mendel keeps the custom of his father, Reb Moshele, who abolished tachanun by Mincha. However, traditionally it is said, and so do Reb Mottele's chassidim, and Reb Yisroel is reinstating the old custom for his chassidim.7




Sources:



1 Personal experience
2 Heard from Lipa Klein, Montreal, a prominent Belz​er chassid who was there
3 Such chassidim
4 Siddur Yetev Lev
5 Siddur Tz'vi Tiferes
6 Viznitz​er siddur
7 Montreal's Yisroel-Viznitz​er dayan
8 Montreal's Shotz​er rebbe's son (See Wikipedia for information about the split within Viznitz)


history - What is Ezra's Immersion / טבילת עזרא


What is Ezra's Immersion / טבילת עזרא and:



  1. Why was it canceled?

  2. How was it canceled?



Answer




I found the following in Rambam's Mishneh Torah:


ספר אהבה הִלְכּוֹת תְּפִלָּה פֵּרֶק ד


ד כָּל הַטְּמֵאִים--רוֹחֲצִין יְדֵיהֶן בִּלְבָד כַּטְּהוֹרִין, וּמִתְפַּלְּלִין: אַף עַל פִּי שֶׁאִפְשָׁר לָהֶן לִטְבֹּל וְלַעֲלוֹת מִטֻּמְאָתָן, אֵין הַטְּבִילָה מְעַכֶּבֶת. וּכְבָר בֵּאַרְנוּ שֶׁעֶזְרָא תִּקַּן שֶׁלֹּא יִקְרָא בַּעַל קֶרִי בִּלְבָד דִּבְרֵי תּוֹרָה, עַד שֶׁיִּטְבֹּל. וּבֵית דִּין שֶׁעָמְדוּ אַחֲרֵי כֵן, הִתְקִינוּ אַף לַתְּפִלָּה, שֶׁלֹּא יִתְפַּלַּל בַּעַל קֶרִי בִּלְבָד, עַד שֶׁיִּטְבֹּל. וְלֹא מִפְּנֵי טֻמְאָה וְטַהְרָה נָגְעוּ בָּהּ, אֵלָא כְּדֵי שֶׁלֹּא יִהְיוּ תַּלְמִידֵי חֲכָמִים מְצוּיִין אֵצֶל נְשׁוֹתֵיהֶן כְּתֻרְנְגוֹלִין; וּמִפְּנֵי זֶה תִּקְּנוּ טְבִילָה לְבַעַל קֶרִי לְבַדּוֹ, וְהוֹצִיאוּהוּ מִכְּלָל הַטְּמֵאִים.


ה לְפִיכָּךְ הָיוּ אוֹמְרִין בִּזְמָן תַּקָּנָה זוֹ, שֶׁאַפִלּוּ זָב שֶׁרָאָה קֶרִי וְנִדָּה שֶׁפָּלְטָה שִׁכְבַת זֶרַע וְהַמְּשַׁמֶּשֶׁת שֶׁרָאָת נִדָּה, צְרִיכִין טְבִילָה לְקִרְיַת שְׁמַע וְכֵן לִתְפִלָּה מִפְּנֵי הַקֶּרִי, אַף עַל פִּי שְׁהֶן טְמֵאִין. וְכֵן הַדִּין נוֹתֵן, שְׁאֵין טְבִילָה זוֹ מִפְּנֵי הַטַּהְרָה, אֵלָא מִפְּנֵי הַגְּזֵרָה, שֶׁלֹּא יִהְיוּ מְצוּיִין אֵצֶל נְשׁוֹתֵיהֶן תָּמִיד. וּכְבָר בָּטְלָה גַּם תַּקָּנָה זוֹ שֶׁלַּתְּפִלָּה, לְפִי שֶׁלֹּא פָשְׁטָה בְּכָל יִשְׂרָאֵל, וְלֹא הָיָה כּוֹחַ בַּצִּבּוּר לַעֲמֹד בָּהּ.


A very quick, rough translation:


All the impure wash their hands like the pure and pray: even though it's possible for them to immerse and remove their impurity, it doesn't prevent praying. And we already expounded on that Ezra made an enactment such that anyone who has had a seminal emission should not read words of Torah until he has immersed. And the courts which stood after that time enacted this also for prayer, that someone who has had a seminal emission should not pray until he has immersed. And this not due to issues of purity or impurity, but such that Torah Scholars should not be busy with their wives all the time in the way roosters; and because of this immersion was enforced after a seminal emission alone, as opposed to other impurities.


Accordingly, at the time the enactment was in force, that even a zav who had a seminal emission and a niddah who had a seminal emission and a woman who copulates and see's that she's become niddah, they require immersion prior to reciting the Shema prayer or regular prayers due to the emission, even though they are impure. And we see that this immersion is not for purities sake, but due to the enactment, such that they should not constantly be with their wives. And also even this enactment regarding prayer has been canceled, since it did not spread to all of Israel, and the public didn't have the strength to abide by it.


EDIT


Just ran across this very detailed article on the subject from the Virtual Beit Midrash in Har Etzion. If I have a chance maybe I'll translate parts of it and post it here.


Tuesday, October 29, 2019

words - What's the difference between "Jew", "Israelite" and "Judaizer"?



What's the difference between "Jew", "Israelite" and "Judaizer"? Can these three terms be used interchangeably? Can only one or only two of these terms be applied to one person?



Answer



There are several, sometimes overlapping families of terms in play:


Israel


This name was given to Abraham's grandson, Jacob, by God and means "God prevails" or "God fights". There's some disagreement over which meaning is accurate, but the source is from this passage in the Torah:




And he said unto him: 'What is thy name?' And he said: 'Jacob.' And he said: 'Thy name shall be called no more Jacob, but Israel; for thou hast striven with God and with men, and hast prevailed.' Genesis 32:28-29 (JPS)



Since Jacob fathered the twelve men who are the founders of the 12 tribes, his name was often used as shorthand for the entire community. We see the same phenomena with Moab, Edom, etc. Sometimes the nation was called Jacob, but Israel is more common. There are several variations:




  • Israelite—Usually reserved for the descendants of Jacob in the ancient world. While it can be applied to anyone from his own sons on, it's most common for it to mean the nation that formed during the Exodus. When the kingdom divided, the northern portion retained the name until they were defeated by the Assyrians. After that point, the people living in that region were called Samaritans and there is some dispute over the exact relationship with Israel. The "-ite" suffix comes from Greek, which suggests the Septuagint coined the term.




  • Israeli—The modern designation for citizens of the nation of Israel. Since nationhood is no longer strictly tied to genealogy, Israelis do not all trace their ancestry to Jacob.





Judah


Judah was one of Jacob's sons and the ancestor of David. As such, the tribe of Judah acquired significant political and cultural importance. When the kingdom of Israel split, the southern portion was called Judah even though it included Benjamin and portions of other tribes as well. Like Israel, there are several variations of this name as well:




  • Jew—Perhaps because of lessons learned from the destruction of the Northern Kingdom, the people of Judah maintained their communal identity while in exile. When the Persian empire conquered the Babylonian empire, the decedents of the kings of Judah where allowed to return to what was now called the province of Yehud. When Alexander conquered Persia, the name became Ιουδαία and under the Romans it became Judea. After a few language jumps, the word arrived in English as Jew. This is the proper term for people who practice the religion described in the Tanakh or have ancestral relationship to Jacob.




  • Judaizer—This is fairly technical term that comes from one early Christian text which describes the first division of Christianity. Most of the early figures of the Christianity were Jewish. Some hoped to spread the religion to all types of people and others hoped to retain Jewish religious practice. Paul, writing on behalf of the first group, argued that gentiles should not be compelled to adopt Jewish praxis, or "live as do the Jews". The Septuagint used the same verb when translating Esther 8:17:




    And in every province, and in every city, whithersoever the king's commandment and his decree came, the Jews had gladness and joy, a feast and a good day. And many from among the peoples of the land became Jews; for the fear of the Jews was fallen upon them.—Esther 8:17 (JPS)



    Christian commentators turned the Greek verb into a noun: judaizer. Needless to say, outside of this fairly narrow context, the term is not helpful. It should be avoided, if not because of the possibility of offense, then because it's unlikely to be recognized.




Hebrew


Although not mentioned in the question, "Hebrews" is a commonly used term for the ancestors of Jacob while they were living in Egypt. The name may have derived from Abraham's ancestor, Eber. Other etymologies have been proposed. The word generally signifies the language of the same name, but at various points in history it has been identified with its speakers. The term emphasizes the text, language, and culture of the people rather than their nation or religion.


Shem


One of Noah's sons, who is identified by Genesis as an ancestor of Abraham. Many people groups fall under the banner of Semitic, but because the term antisemitism refers to an attitude of hostility to Jews, the word Semite is sometimes mistakenly used for Jews alone.


Conclusion



While there is significant overlap between the term Israelite and Jew, these terms are not always interchangeable. "Judaizer" probably should not be used at all outside of specific domains.


halacha - Can one use Maaser to pay a Mohel?


Can a father use maaser money to pay a mohel to give his son a bris milah?


The question is strenghtened since a person is not allowed to charge for performing a mitzvah.





word choice - How should I select what first-person pronoun to use?


I've always had trouble choosing which first person pronoun to use - 私 (watashi), 僕 (boku), or 俺 (おれ). What kind of factors should I keep in mind when choosing between these? Is it common to vary one's choice by the social context, or do people tend to select one and stick with it all the time?



Answer




It depends a lot on the situation. I try to keep it simple and only use three most practical forms of the pronoun:


僕 (boku) :: I use it whenever I am not at work


俺 (ore) :: Almost never use 俺 unless most people around me are already using 俺, too informal.


私 (watashi) :: What I always use at work. Never ever use boku at work, or in an email, since somebody could consider that you are being rude and not too formal. (Happened to me a couple of times when I was a new graduate at a Japanese company).


minhag - Origin of Reciting Psalms


What is the origin of reciting Tehillim as a form of prayer? More specifically, of reciting even passages of Tehillim which do not contain requests for the issue one is facing but rather of praise of God and the like. Earliest sources would be appreciated.




downsampling - Scipy resample, "fourier method" explanation


I am seeking explanation of what "Fourier method" is that is described for resampling in documentation of resample() method. I want to downsample an array. I know what decimation is and how it works, I also know what fourier transform is. I cannot however find "scientific backup" so to say to the resample method in scipy. I saw this topic:


Python's $\tt resample$ vs $\tt resample\_poly$ vs $\tt decimate$


I also searched across some books regarding digital signal processing. Am I missing something obvious? I looked in the implementation of resample and I know it performs fourier transform on signal and then takes half of samples needed from the beginning of transformed array and from the end. Then it inverses fourier transform coming back to time-domain. I cannot find scientific description of this method. In the link above, this was mentioned:


https://en.wikipedia.org/wiki/Trigonometric_interpolation#Relation_with_the_discrete_Fourier_transform


I don't understand how interpolation is connected with downsampling. Could anyone explain and/or link some resources? Scipy docs has this in method description:



Resample x to num samples using Fourier method along the given axis.


The resampled signal starts at the same value as `x` but is sampled
with a spacing of ``len(x) / num * (spacing of x)``. Because a
Fourier method is used, the signal is assumed to be periodic.

Thanks in advance.



Answer



Suppose you have initially a real-valued sequence x of length N. The function is basically doing this:



  • To upsample, it transforms to the frequency domain and adds N/2 zeros at the end. Then it transforms back to the time-domain.


  • To downsample, it transforms to the frequency domain and deletes the second and third groups of N/4 elements (which correspond to the half with the highest frequency components). Then it transforms back.


You can try it on your own running step by step the source code for the resample() function.


The theory regarding these methods can be found in this answer.


organic chemistry - Does acetone eat through Thermoplastic polyurethane and Polycarbonate


I used nail polish remover on an expensive phone case to remove sticker residue (and it worked, no longer sticky). I didn't know it didn't mix well with plastic materials. Did the acetone damage it?





grammar - When is たら or 時 being preferred more than the other?


たら and 時 can be used to say "when" expressions. I have learned these grammatical expressions already. In the book みんなの日本語, there is a question that goes...



昼ご飯を a.食べた時 b.食べたら、すぐ出かけます。



When seeing this, instantly I would pick 'b'. However I can't explain to myself why it had to be 'b' when 'a' doesn't sound grammatically wrong. Is it perhaps the すぐ that made it that way?



Answer



Because 時 means "the time when" but not "then". The word "when" seems to mean the both.


昼ご飯を食べたら、すぐ出かけます would be translated as "After eating breakfast, (then) I will go out soon."



Does 昼ご飯を食べた時、すぐ出かけます(The time when I ate breakfast, I will go out soon.) make sense?


parshanut torah comment - Was Re'uven confessing along with the rest of his brothers regarding what happend to Joseph?


In Breishit 42:21, the verse begins:


"Each person said to his brother, we are all guilty..."


In verse 22, Re'uven chastises his brothers by telling them, "Didn't I tell you do not do sin with the child..."


Going back to the initial account of the story, in Breishit 37:20-22, the brothers propose to kill Joseph. Re'uven suggests, don't kill him, but throw him in this pit planning to eventually return to retrieve Joseph and return him to his father. Rash"i explains that there were snakes and scorpions in the pit. During the time of the suggestion, wouldn't Re'uven realize that putting Joseph in the pit was dangerous? Maybe not?


So, there might be a contradiction with the initial story and verse 42:21. Re'uven was not around when they sold Joseph. If he is confessing with his brothers, why is he doing that, if he wasn't responsible for the selling?


All the verse says is that they said "We are guilty for seeing our brother's suffering and we didn't listen" (It doesn't say what or to whom they didn't listen. I assume it means to Joseph's screaming for mercy.) So, if Reuven, in fact IS confessing his guilt with his brothers, then, in the next verse, when he chastises them, what purpose does that accomplish? His suggesting that they place Joseph in a pit might have also caused his death.


Another angle - If Re'uven knew, in advance, that he had to leave his brothers, why did he trust them that they would leave Joseph alone in the pit while he was gone? Even discounting the factor, we see that despite his intentions to retrieve Joseph from the pit, he doesn't do this, immediately, but he disappears from the scene.


Something to note in verse 21 - the brothers say, "Therefore all this trouble has come upon us." Even if Re'uevn is not part of that actual confession, the "trouble" the brothers are referring to is the claim of being spies, which includes Re'uven as well. So, they would be including Re'uven in the consequences, anyway.




Answer



The simplest answer is that your translation is not accurate. The verse actually states:



וַיֹּאמְר֞וּ אִ֣ישׁ אֶל־אָחִ֗יו אֲבָל֘ אֲשֵׁמִ֣ים׀ אֲנַחְנוּ֘ עַל־אָחִינוּ֒


And they said to each other: we are guilty for [what we did to] our brother.



There is no indication that Reuven (or any other given brother) admitted guilt. The simple reading of verse 22, indicates that Reuven said "to them", as opposed to himself who was not included in the confession of verse 21.


Indeed, the Meshivat Nefesh to verse 21 suggests that they didn't initially think that they were being punished for Yosef, since they were all in the same boat, but Reven was innocent!


However, Ohr Hahayyim to verse 21 suggests that Reuven was aware that Yosef was thrown into the pit, and therefore shared a degree of culpability for not saving Yosef when he cried for help. (Ohr HaHayyim references the snakes and scorpions in the pit, indicating that he believes in that Midrashm, although he also references fear of dehydration as a reason why Yosef would have cried for help.)


Also regarding the Midrash about the snakes, Ramban (Genesis 37:22) notes it isn't peshat. Hizkuni (there) suggests that even according to the Midrash about the snakes, Reuven wasn't culpable, since Reuven wouldn't have put him into an infested pit. Rather, Reuven had him thrown into a non-infested pit, and after Reuven left, they switched him into a different, infested, pit. Rabbenu Hayyim Paltiel (there) suggests a variation of this explanation. He suggests that Reuven suggested that they throw him into one (not infested pit), and instead they threw him into a different pit (that was infested). This is suggested by Riva al HaTorah as well. Alternatively, if one accepts this Midrash, one could suggest that Reuve didn't know about the snakes (Ramban, Riva's second explanation). Alternatively, Riva suggests that Reuven assumed that Yosef would simply use sorcery to protect himself from the snakes.



Furthermore, regarding the question of Reuven's culpability for leaving Yosef in the pit, the Midrash Tanhuma (ed. Buber Parashat Vayeshev 13) suggests that had Reuven known that he would be mentioned in the Torah as trying to save Yosef, the wouldn't have left him there, but would have just taken him home. This indicates that Reuven didn't do his best, since if he was already doing his best, why would he act differently if he knew it would be mentioned in the Torah.


Other Midrashim, however, portray Reuven's leaving in a positive light, such as suggesting he was doing t'shuva (B'reshit Rabba: Parashat Vayeshev 84), or going take care of Yaakov, or that he was hiding out for the purpose of coming back to save Yosef (Pirkei D'rAbbi Eliezer (ed. Higger 37), Midrash HaBeiur to Genesis 37:29).


tznius modesty - The practice of (not) printing pictures of women in magazines and newspapers under religious auspices


I was reading a My Encounter the other week (not available online) which had an interview with the editor of The Moshiach Times. In it he described how the practice of other religious magazines at the time (1980's) was to not include pictures of women (or girls) of any kind on the cover. The interview goes on to describe how the Lubavitcher Rebbe (who reviewed every issue before publication) insisted on including a picture of a girl on every cover, even if the theme of the cover (like a boy's room) didn't really fit.


I later found (with pictures of the relevant covers, including a before and after of the boy's room) a similar description of the story here of the covers here towards the end of the article, with a different (perhaps complimentary) description of the nature of the objection that had nothing to do with the content of other magazines.


I also notice that magazines like Mishpacha and Ami never include pictures of women, even in the section written by and targeted to women - never a picture of the author or any female subject of the story. In terms of illustrations, Mishpacha will only include an illustration of a girl in its kid's cartoon series, whereas Ami will include illustrations of adult women.


The Nshei Chabad Newsletter seems to have no issue, not only with illustrations, but also with pictures of girls and women, although I have no idea what drives that decision.



In a couple of related observations, I know of a camp in flatbush that would not show Young Avraham because it contained animations of women, and I saw a DVD which re-enacted "The cow that wouldn't work on Shabbos" where there was a scene of a Shabbos meal where the wife of the home was conspicuously absent.


What are the opinions of Poskim (contemporary or otherwise) regarding the propriety of publishing such pictures, and their reasons?


Note: As should hopefully be obvious, this question is only about modest pictures of women or girls. It is assuming that immodest pictures would be a problem.



Answer



The Nitei Gavriel wrote a letter to the Lubavitcher Rebbe about publishing the pictures of the Rebbetzin, and the Lubavitcher Rebbe's response (in bold):


Nitei Gavriel's letter and the Rebbe's notes on it



ב"ה, י"א אדר [תשמ"ח] לכבוד כ"ק אדמו"ר הגה"ק שליט"א באתי להעיר אודות שיצא לאור ספר אמנו "המלכה" בודאי הבחין בהפשוט גם בלא הסתכלות כלל - אשר במהדורא אחרת הוסיפו בלי צבעים תמונה מהרבנית ע"ה ולפענ"ד אינו נכון - ואף דאחז"ל סנהדרין מ"מ גמירי אין יצה"ר שולט אלא במה שעיניו רואו ושולל בנוגע לאחרנייתא וגם קיי"ל באה"ע סי' כ"א ס"א דאסור 1) להסתכל אף בבגדי 2) צבעונים של אשה 3) שהוא מכירה ומכלל הן אתה שומע שלילת האיסור כאשר אין ג' הנ"ל, ובפרט - כל הג' (ועי' באוצר הפוסקים סקי"ב בשם שו"ת הב"ח סי' י"ד דגם בבגד אשה שכבר מתה עיי"ש) משא"כ בנ"ד ועכ"פ מדת חסידות להחמיר, אלא שעי"ז יתמעט ב"והחי יתן אל לבו" - כנראה במוחש (ואולי זוהי סברת המוסיפים הנ"ל). ואשרי הדור שהגדולים נשמעין לקטנים



So the Nitei Gavriel said that the evil inclination only incites to what he can see, and the Shulchan Aruch (Even HaEzer 21:1) says that one isn't allowed to even look at women's colored clothing who he recognizes, and the Bach says that even the clothing of a woman who passed away is forbidden to look at, so all the more so a pious person should avoid looking.



The Lubavitcher Rebbe responded:



  1. In another print they published the picture black and white,

  2. While the evil inclination incites one to sin only who one sees, it doesn't incite one to sin with another (meaning, if A sees B, he's not incited to sin with C).

  3. It's forbidden to stare, at colored clothes, and only if he knows her. But if all the above three conditions aren't present, it's permitted.

  4. Being stringent in not looking at her will hurt one's "VeHachai Yiten El Libo" - the living will take to heart (and learn from her behavior).


calendar - Why do we need a separate celebration for Shushan Purim in walled cities?


Purim is celebrated on Adar 14 because that was the day the Jews rested after prevailing against their enemies. In walled cities, Shushan Purim is celebrated on the 15th because that was when the fighting ended in Shushan (a walled city).




Later, in deference to Jerusalem, the Sages determined that Purim would be celebrated on Adar 15 in all cities which had been enclosed by a wall at the time of Joshua's conquest of the Land of Israel. This criterion allowed the city of Jerusalem to retain its importance for Jews, and although Shushan was not walled at the time of Joshua, it was made an exception since the miracle occurred there. Wikipedia



I have 2 questions:




  • Why do we need a separate celebration for walled cities at all?




  • How does celebrating Shushan Purim in Jerusalem "allow it to retain its importance"?






Answer



The Beis Yosef in Orach Chaim 688:3 addresses both of your questions:


1) "Why do we need a separate celebration for walled cities"



ואיכא למידק למה חלקו מצוה זו לימים חלוקים וקבעו יום מיוחד לפרזים ויום מיוחד לכרכין משא"כ בשאר המצות


Why did they divide this mitzvah [Purim] into separate days, fixing a distinct day for the unwalled cities and a distinct day for the walled cities, unlike any other mitzvah?


ותירץ הר"ן שמפני שהיהודים היושבים בערי הפרזות והיהודים שבשושן לא נחו מאויביהם ביום א' שהרי היהודים הפרזים נחו בי"ד והיהודים שבשושן כחו בט"ו ועשו כל אחד ביום מנוחתו משתה ושמחה לפיכך כשקבעו עליהם י"ט לדורות קבעוה לכל א' ביום שנח בו


The Ran answers that the Jews in the surrounding cities and the Jews in the walled cities didn't rest from fighting on the same day- Jews in the surrounding cities stopped fighting on the 14th, Jews in walled cities stopped fighting on the 15th- and on the day they each rested, they each made a party and had a feast. Thus when they established Purim for generations, they established it for each day that people rested.




Ie- the separate celebration (Shushan Purim) was enacted for this reason.


2) How does celebrating Shushan Purim in Jerusalem "allow it to retain its importance"?


To answer this question, we need to establish why the criteria for celebrating Shushan Purim is based off of cities that were walled during the time of Yehoshua bin Nun vs cities that were walled during the time of Achashveirosh.



וי"ל דהיינו טעמא כדי לחלוק כבוד לא"י כדאיתא בירוש' ופירוש הענין שכיון שהוצרכו לחלוק בין מוקפין לשאין מוקפין כשם שנחלקה שושן משאר עיירות אילו תלו הדבר מימות אחשורוש היתה א"י שהיתה חרבה באותם הימים נדונית כפרזים והיה גנאי בדבר ולפיכך תלו הדבר בימות יהושע בן נון


And there are those who say the reason is in order to give honor to Eretz Yisrael like we see in the Yerushalmi. And explaining the matter that since we needed a distinction between walled vs unwalled cities, just as Shushan was separated from other cities, if we based the the requirement from walled cities during the times of Achashveirosh, it would be an insult to the Land of Israel which then lay in ruins. Therefore the distinction of walled vs unwalled is based off the days of Yehoshua bin Nun.



The Beis Yosef seems to suggest that the fundamental reason why Purim was separated into two days was to honor of the Land of Israel.


Thus celebrating Shushan Purim in Jerusalem is explicitly fulfilling the very purpose of why Shushan Purim was enacted- ie allowing Jerusalem to retain its importance.



Monday, October 28, 2019

shemoneh esrei - Morid HaGeshem or Morid HaGoshem


What is the correct pronunciation HaGeshem or HaGoshem?



Answer



Since geshem changing to gashem is dependent on whether the word comes at the completion of a phrase (esnachta or sof pasuk), the real question is:


Is the ability to make rain a praise in itself (ending the phrase- hagashem), or is it only a praise if it is used to sustain life and must be followed by mechalkel chaim b'chesed (hageshem)


There are many in each camp. Interestingly, even though Rav Moshe writes hagashem, the sefer Tefila K'hilchasa quote a pamphlet (Mechalkel Chaim) which claims much support for hageshem and claims that Rav Moshe retracted.


halacha - Heter Iskah practical implications for a private loan


This question is about practical differences in receiving a loan from a "Heter Iskah" certified bank and from not certified one, with the same term and percentage.


In other words, besides the background Halachic permission, are there any ramifications for the borrower?




set phrases - When to use "どうぞよろしくお願{ねが}い致{いた}します。" in a greeting?


Once the context is that we are about to part ways, when I want to say "goodbye" to someone in maximum 敬語{けいご}, I say「どうぞよろしくお願い致します。それでは、失礼いたします。」.


Is that usage of 「どうぞよろしくお願い致します」 correct?
Is 「どうぞよろしくお願い申し上げます」 also ok? Is the nuance different?



Answer




If you are saying good-bye to someone to whom you have just made a request, yes, you can say 「どうぞよろしくお[願]{ねが}いいたします。それでは、[失礼]{しつれい}いたします。」 


We often say EXACTLY that in business settings. Quite a few adult speakers would actually speak like that even in non-business occasions, but even for those people, the phrase would be too formal to use with close friends.


Less formal versions:


「よろしくお願いします。では失礼します。」


「よろしく~。じゃあねえ!」


Regarding 「どうぞよろしくお願い[申]{もう}し上げます。」, it is one step more formal than 「どうぞよろしくお願いいたします。」 It can still be used verbally in business, but it would mostly be reserved for writing. The two phrases have exactly the same meaning. It is just that the former raises the status level of the other person higher than the latter does.


correlation - Need help understanding convolution indexing


Ok, this is leaving me increasingly frustrated. This builds on a previous question here but I am still not getting the indexing, although I learned from that question all the same.


Case 1: First convolution equation example:



$$ h[k] * h^*[-k] = \sum_{n=-\infty}^{\infty} h[n] \ h^*[n+k] $$


The way I got the right hand side, was:


1) Make the $h$'s have dummy variables, so $h[n]$ and $h^*[-n]$.


2) Flip one of them around, so now I get $h[n]$ and $h^*[n]$


3) Add the delay $k$ into the one that way flipped, so finally I have $\sum_{n=-\infty}^{\infty} h[n] \ h^*[n+k]$.


Great, I have a convolution.


Case 2: Second convolution example: (Unrelated to first)


We have:


$$ \sum_{i=-\infty}^{\infty} h[i-m] \ R_{xx}[i]. $$


Here we want to try and find out what convolution this corresponds to. The way to solve this, (apparently), is to make the assumption that another variable $g[n]=h[-n]$, and call it a day. Then we get:



$$ \sum_{i=-\infty}^{\infty} h[i-m] \ R_{xx}[i] = \sum_{i=-\infty}^{\infty} g[-(i-m)] \ R_{xx}[i] = \sum_{i=-\infty}^{\infty} g[m-i] \ R_{xx}[i] = g[m] * R_{xx}[m] = h[-m] * R_{xx}[m] $$


This works great.


Case3: The problem:


This is my problem. Case 1 showed the steps for how to do a normal convolution. Case 2 showed how the method of substitution works. However, if I try to solve Case 1 using this substitution method, I get the wrong answer, even though it worked on case 2. Why is that?


To wit - where am I going wrong here?


$$ h[k] * h^*[-k] = h[k] * g^*[k] = \sum_{n=-\infty}^{\infty} h[n] \ g^*[k-n] = \sum_{n=-\infty}^{\infty} h[n] \ h^*[-(k-n)] = \sum_{n=-\infty}^{\infty} h[n] \ h^*[n-k] $$


However, this is **clearly* the wrong answer! What am I doing wrong here?




weather - Snow in Halacha




Name the many references in different contexts in Halacha to snow?



Answer





  • Whether a frozen mass of it can constitute the wall part of an eruv demarcation. (Aruch Hashulchan או"ח שסב:טו)

  • Purges sins. (See the Gr"a on "לא תירא לביתה משלג".)


How are Pauling's rules applied to Nitric acid?


The Lewis structure of nitric acid is:


enter image description here


So, since Pauling's rule is $\mathrm{p}K_\mathrm{a}=8-5p$, where $p$ is the number of oxo groups, how is the rule applied in this instance? $p=1.5$? $p=2$?




conjunctions - から and ので formation/conjugation differences


Consider the case when から and ので follows a noun, な-adjective, or noun-equivalent:



から:静かから... "Because it is quiet..." (Subjective causality)



ので:静かので... "Because it is quiet..." (Objective causality)



(Question) What causes the difference in the parts in bold above?




Answer



から 'since, because' attaches to a clause, whereas 'with (the reason being)' attaches to a noun. 静かだ is an indicative clause (ordinary sentence), so you can simply attach から, but not .




  • 静かだから

  • × 静かだで




In order to use , you have to have a noun. To do that, you use the formal noun (or nominalizer) taking an appositive clause. In appositive clauses and relative clauses, na-adjectives take the adnominal ending ~な.




  • × 静かなのから

  • 静かなので



Sunday, October 27, 2019

time - Understanding the timeline of the drying up of the Flood waters


After the 40 days of rainfall and 150 of the waters surging, the rest of the Flood period was the time it took the waters to dry up. Rashi (to Gen. 8:3-4,13-14) gives the timeline as follows:





  • The Flood waters reached 15 cubits above the highest mountains (ibid. 7:20). They started to recede on the first of Sivan, at the rate of 1/4 of a cubit per day, so it took 60 days for the mountaintops to be revealed. This was on the first of Av.




  • Sixty days later, on the first of Tishrei, Noach saw that the water was gone, but the ground was still muddy.




  • After another 57 days, on the 27th of Cheshvan, the earth was completely dry.





Ramban (8:4) raises various objections to Rashi's timeline. He has the waters beginning to recede on the 17th of Nissan, then 73 days from then until the mountaintops appeared (on the first of Tammuz), 90 days from then until the water was gone (first of Tishrei), and 57 more days until the earth was dry (27th of Cheshvan).


Now my questions:




  1. According to Rashi, how indeed would 60 days have sufficed for the water to recede all the way from the mountaintops to sea level?




  2. Even according to Ramban, if it took 73 days for the water to recede 15 cubits, how would the rest of it have disappeared in just 90 days? (It is true that he uses the analogy of a stream, where the rate of its recession accelerates as the water level drops, but this seems all out of proportion to that.)





  3. According to both of them, why then did it take so long - almost two months - for the ground itself to dry out?





Answer



Wouldn't #3 answer the other two? Proposed answer: part of the miracle of the Mabul was that the ground was able to act as a super sponge when the rain stopped.


(personally, I'm not too comfortable with that, there seems something wrong with it but I can't put my finger on it)


optimization - Implementation of Block Orthogonal Matching Pursuit (BOMP) Algorithm



How would one implement the lock Orthogonal Matching Pursuit (BOMP) Algorithm?



Answer



The Block Orthogonal Matching Pursuit (BOMP) Algorithm is basically the Orthogonal Matching Pursuit (OMP) Algorithm with single major difference - Instead of selecting single index which maximizes the correlation we chose a set of indices, sub set of columns of the matrix and the solution vector.



A good reference for the algorithm is given in:



  1. An Optimal Condition for the Block Orthogonal Matching Pursuit Algorithm.

  2. Block Sparsity: Coherence and Efficient Recovery.


The code is given by:


function [ vX ] = SolveLsL0Bomp( mA, vB, numBlocks, paramK, tolVal )
% ----------------------------------------------------------------------------------------------- %
%[ vX ] = SolveLsL0Omp( mA, vB, paramK, tolVal )
% Minimizes Least Squares of Linear System with L0 Constraint Using

% Block Orthogonal Matching Pursuit (OMP) Method.
% \arg \min_{x} {\left\| A x - b \right\|}_{2}^{2} subject to {\left\| x
% \right\|}_{2, 0} \leq K
% Input:
% - mA - Input Matirx.
% The model matrix (Fat Matrix). Assumed to be
% normlaized. Namely norm(mA(:, ii)) = 1 for any
% ii.
% Structure: Matrix (m X n).
% Type: 'Single' / 'Double'.

% Range: (-inf, inf).
% - vB - input Vector.
% The model known data.
% Structure: Vector (m X 1).
% Type: 'Single' / 'Double'.
% Range: (-inf, inf).
% - numBlocks - Number of Blocks.
% The number of blocks in the problem structure.
% Structure: Scalar.
% Type: 'Single' / 'Double'.

% Range: {1, 2, ...}.
% - paramK - Parameter K.
% The L0 constraint parameter. Basically the
% maximal number of active blocks in the
% solution.
% Structure: Scalar.
% Type: 'Single' / 'Double'.
% Range: {1, 2, ...}.
% - tolVal - Tolerance Value.
% Tolerance value for equality of the Linear

% System.
% Structure: Scalar.
% Type: 'Single' / 'Double'.
% Range [0, inf).
% Output:
% - vX - Output Vector.
% Structure: Vector (n X 1).
% Type: 'Single' / 'Double'.
% Range: (-inf, inf).
% References

% 1. An Optimal Condition for the Block Orthogonal Matching Pursuit
% Algorithm - https://ieeexplore.ieee.org/document/8404118.
% 2. Block Sparsity: Coherence and Efficient Recovery - https://ieeexplore.ieee.org/document/4960226.
% Remarks:
% 1. The algorithm assumes 'mA' is normalized (Each column).
% 2. The number of columns in matrix 'mA' must be an integer
% multiplication of the number of blocks.
% 3. For 'numBlocks = numColumns' (Equivalent of 'numElmBlock = 1') the
% algorithm becomes the classic OMP.
% Known Issues:

% 1. A
% TODO:
% 1. Pre Process 'mA' by normalizing its columns.
% Release Notes:
% - 1.0.000 19/08/2019
% * First realease version.
% ----------------------------------------------------------------------------------------------- %

numRows = size(mA, 1);
numCols = size(mA, 2);


numElmBlock = numCols / numBlocks;
if(round(numElmBlock) ~= numElmBlock)
error('Number of Blocks Doesn''t Match Size of Arrays');
end

vActiveIdx = false([numCols, 1]);
vR = vB;
vX = zeros([numCols, 1]);
activeBlckIdx = [];


for ii = 1:paramK

maxCorr = 0;

for jj = 1:numBlocks
vBlockIdx = (((jj - 1) * numElmBlock) + 1):(jj * numElmBlock);

currCorr = abs(mA(:, vBlockIdx).' * vR);
if(currCorr > maxCorr)

activeBlckIdx = jj;
maxCorr = currCorr;
end
end

vBlockIdx = (((activeBlckIdx - 1) * numElmBlock) + 1):(activeBlckIdx * numElmBlock);
vActiveIdx(vBlockIdx) = true();

vX(vActiveIdx) = mA(:, vActiveIdx) \ vB;
vR = vB - (mA(:, vActiveIdx) * vX(vActiveIdx));


resNorm = norm(vR);

if(resNorm < tolVal)
break;
end

end



end



The MATLAB code is available at my StackExchange Signal Processing Q60197 GitHub Repository.
In the full code I compare the Block implementation to OMP to verify the implementation.


grammar - Difference between ことから and から


Are there any differences in intonation if used in a sentence like this?



支持率が高いことから/から、多くの国民が新内閣に期待していることがわかる




Answer




から of 高い/こと/から is "from"
から of 高い/から is "because"


If I translate, I use these structures


〜ことから
「支持率が高いこと」 shows 「多くの国民が新内閣に期待していること」


〜だから
Because 「支持率が高い」, (we) 「多くの国民が新内閣に期待していることがわかる」


halacha - When can one "bring in" Yom Kippur?


I've read in several places that one must bring in Yom Kippur before dark, just as we do for Shabbos. The time listed as the beginning of Yom Kippur (e.g. MyZmanim) seems to be 18 minutes before sunset (as is the custom for Shabbos).


That being the case, is one permitted to wait until past that time, and "go into the 18 minutes," before bringing in Yom Kippur as long as you bring in Yom Kippur within the 18 minutes (i.e., before sunset)?




grammar - はずもない、はずはない、はずがない. Difference and meaning


Today listening a song I've heard something I can't understood



だけどなれるはずもなくて

So i started to gather information about this, but it gets me more confused and furthermore found out two more



はずはない



 and 



はずがない




So, i want to know what is the meaning of this and how should i choose one when speak. Thank you so much in advance for any help you can bring me. I really appreciate it




grammar - What is the meaning of ことに当たるように?


What is the meaning of ことに当たるように in this example (there is already a post of にあたって/にあたり, but I can't understand)?



以後{いご}はトムと協力{きょうりょく}してことに当{あ}たるように。




Answer



It's a fixed phrase:



事に当たる



物事を担当する。従事する。「式典には全社をあげて―・った」
(Translation: take charge of / engage in some work: "The whole company was involved in the ceremony.")



(The linked entry also has a second definition, but it's classical usage. Forget it.)


ように that ends a sentence should be interpreted as formal command.



From now on, you should cooperate with Tom to handle it.





You may be confused because both こと(①-3) and 当たる(5-㋐) are used here in their original meanings, rather than as function words. The best practice is writing this こと in other than hiragana, but sometimes they do this way. Nevertheless, you'll know the こと isn't a nominalizer but a standalone noun because 協力して can't connect to it in this form.



Conversion atom to another


One child has claimed to have find a solution to all physical problems. On asking for details, he said that all periodic elements has common components, i.e. electrons, protons, neutrons. The child has suggested a solution: convert atom to another by adding electron. This way one can get substance like $\ce{H2O, Au, He}$ in abundance. How can it be done?



Answer



While what you suggest may sound nice on paper, it has some serious problems.




  1. Getting the elements. Let's say that we're talking about purifying water to remove toxic elements such as Hg or Cd. Extracting the elements out of the water is a feat by itself, for example using reverse osmosis methods. This is a method used for seawater desalination - to turn them from salt water filled with all kinds of elements into drinkable water. This process is very expensive, and a very polluting one as well. Desalination just the amount of water you need for drinking water is complicated, so desalinating an entire reservoir is simply not going to happen.

  2. Let's say you did somehow manage to extract the element in question. Now you need nuclear reactions to transmute one element to another. Not all are possible. For some elements, like Tc or Am this is the only way you can produce them. However, you are going to end up with radioactive nuclear waste.


To sum it up, even if it was possible, you would need so much power and to do it and you will produce some much pollution that it's simply not worth it. Just going and mining the gold will be orders of magnitude cheaper (and probably cleaner) than producing it using nuclear reactions.


If you do manage to somehow extract the the polluting elements, you usually do something else with them (aka recycling) and you do not attempt being an alchemist. Another example is soils contaminated with lead. The solution is to just dig it up, put it somewhere where it is not hazardous to anyone and replace it with clean soil.


particles - Can ぐらい be used to replace ごろ?


A question from my N5 mock test book reads:



A 「何{なん}時{じ}に うちへ 帰{かえ}りますか。」


B 「7時{じ} (    ) 帰{かえ}ります。」



1 ごろ  2 じゅう  3 まで  4 ぐらい


The answer was 1, but I've been taught that both ごろ and ぐらい are interchangeable when talking about points in time (時刻), like 7時 or 4月.



Is ぐらい really acceptable when ごろ should be used?


(Note: I am of the impression that ぐらい and くらい mean the same, and so do ごろ and ころ.)



Answer




A 「​[何​時]{なんじ} ​に うちへ ​帰 {かえ} ​りますか。」


B 「7​時 {じ} ​ (    ) ​帰 {かえ} ​ります。」


1 ごろ  2 じゅう  3 まで  4 ぐらい



The only possible answer is 1) ごろ.


Had the fourth choice been 「ぐらい」 instead of just 「ぐらい」, it would also have been a correct answer. Not sure where you have been taught it was correct to say 「~時ぐらい帰る」, because it is not.



So, to say "to return home around 7-ish", you can use:


「ごろ」, 「ごろに」 and 「ぐらいに」.


But you cannot use 「ぐらい」. In other words, 「~時ごろ」 can function adverbially to modify the verb 「帰る」 without a 「に」. 「~時ぐらい」 cannot; It needs a 「に」 to function adverbially.


The following usage of 「ぐらい」, however, is correct.



A 「家に帰るの、いつも何時ぐらい?」


B 「7時ぐらい。」



This is OK because there is no verb following in either line. You don't need an adverbial phrase here.


Kanji radicals: Question to the radical assignment in dictionaries


I was browsing through the webpage of Japanese radicals on wikipedia (http://en.wikipedia.org/wiki/Table_of_Japanese_kanji_radicals)


I noticed



and



bot entries are referencing in the most right column to the respective other radical



I looked furthermore into the KANJIDIC2 kanji-lexicon file and it seems like these two kanjis-radicals are seemingly randomly assigned to kanjis.


According to this dictionary, the Kanji 育 has 肉 as radical (which it obviously has not, its 月). I made this observation in many places (I assumed all open dictionaries rely on the same public Kanji dictionary?)




80b2
16-73


130
8



Does anyone know the (historical) background of this 肉/月 radical interchangeability



Answer



Two premises:



  1. Radicals are a method for indexing characters in dictionaries.

  2. As an element in other characters, the form 月 can represent 肉, 舟, 丹, and 月, among others.


As you can see, these elements all look rather similar, so it's not surprising that historically they weren't always distinguished in form.



So when you see a character containing what appears to be 月, how do you know which Kangxi radical to look it up under? How would you know that 肘 and 服 are in different sections of the dictionary if you haven't learned to read these characters yet?


The editors of some kanji dictionaries have tried to solve this problem by merging radicals which are visually indistinguishable. For example, the New Nelson moves all the characters traditionally classified under 月 to 肉 (except for 月 itself). This doesn't really make sense in terms of meaning, but it makes the dictionary easier to use. This merger is especially useful for students like yourself who see 育 and say that it obviously contains 月.


You may be interested to know that in characters where 月 represents 丹, it is sometimes instead written with 円—specifically in 青 and characters containing it such as 錆, 鯖, and 睛.


What are poles and zeros?


The concept of poles and zeros in filters was introduced to me during our lab (our lab isn't sync with our lecture) through the pole-zero plot generation of filters in MATLAB. I didn't get its importance until it was mentioned in our lecture that poles make the equation infinity (or its denominator zero) while the zeros make the roots in the numerator zero. I still can't quite grasp what poles and zeros are. Can someone give an an intuitive and simple explanation on what poles and zeroes are? Much appreciated.



Answer



Take the equation b/(x-c) with b non-zero. The ratio goes to infinity as x approaches c. So c is the location of a pole (something tall and pointy in a graph).


Take the equation (x-b)/c with c non-zero. The ratio goes to zero as x gets closer to b. So b is the location of something commonly called "a zero".



You can not only do this with scalar x, but with complex x, thus the domain of the poles and zeros will be on a (complex) plane instead of on a line.


If the ratio represents something about the response of a filter, it might say the filters output is at or near zero when the input is at or near a response "zero". And bad things might start to happen when x gets close to a pole (power supply starts smoking when asked to supply infinite amps, math operations produce NaNs or fixed-point overflows, etc.)


parshanut torah comment - Mordechai - Religious Leader or Political figure?


I'm looking to gather some more background, context, sources and opinions, regarding Mordechai's religiousness, or lack thereof.


This was the topic of a recent comment thread on Was Darius Jewish?, specifically on @avi's answer.
Though this was not the topic of the question nor the answer, a side comment turned into a long thread on this.
Instead of hashing it out there, and just between us, I thought it would be a good idea to gather some additional voices.



So, to the issue:
Many well-known midrashim pose Mordechai as a tzaddik, a religious leader, and even a member of the Sanhedrin. I'm sure we all learned these at one point or another.
On the other hand, reading the Megilla as a "story", focusing on the pshat, but taking into account the historical and cultural context, in addition to relevant background added by other books in the Tanach (such as Melachim Bet, Divrei Hayamim, and other Nevi'im) - it would seem that this was not the case. At the least, there is no evidence or basis for the "religious figure" theory, but rather the evidence seems (at least to me) to point in the opposite direction.


Now, taking into account the intended ambiguity, which is one of the most fundamental motifs of the Megilla, and the obvious historical distance, I don't expect to find "the one true history"...


But I am interested in hearing, what is the basis for the "religious leader" theory? Is there evidence for this, or is it "just" Midrash* ? What was the original source? What is the Midrash based on? (Obviously besides the Midrash itself, and the persuant discussions in e.g. Gmara*... )
Or, alternatively (and preferably), sources and explanations for the opposite theory?


EDIT: To emphasize, I am referring to Mordechai's "back story". Even according to the "non-religious" theory, there is plenty of room to allow for a change of heart as a result of the Purim events. Therefore anything that relates to his situation after the fact (such as @follick's excellent source in Nechemia) would be besides the point.


EDIT2: I don't intend on ignoring the midrashim, nor do I expect to be completely independant of them. Rather, I'm interested in the basis of those midrashim, as these are usually based on something, be it a reference, alliteration, extraneous wording, "secret" story, etc.




(*) I'm not belittling the importance of those Midrashim or the discussions in the Gmara, of course, but it is both important and extremely difficult to discern which stories are intended to be accepted literally, as "historical fact", and which not.

Hence this question.



Answer



Here are a couple:




  • The very fact that the Megillah introduces him as איש, and takes the trouble to tell us his lineage and background, indicates that he was a person of importance. (It is true that איש can mean simply "a man," but quite often in Tanach, when a person is introduced with this term, it bears the connotation of "a prominent person" - one example is Mordechai's ancestor Kish, in I Sam. 9:1.)


    Contrast with Haman, whose background information is limited simply to the three words בן המדתא האגגי.




  • The man refused to bow to Haman even under pressure, and even though he knew he was thereby putting himself at risk. This is not the action one would expect from a person who, as in your comments to the other thread, is semi-assimilated. Neither would such a person's first reaction to the decree be putting on sackcloth and ashes rather than trying to use his connections at court.





  • For that matter, consider Esther's request to him, "Gather all of the Jews in Shushan, and fast for me..." She was Mordechai's ward, and it is reasonable to assume that this is an idea she learned from him. (Then, too, if he wasn't a known religious leader, why would she expect that anyone would follow his lead in doing so?)




  • It is also likely, of course, that the Talmudic and Midrashic evaluation of Mordechai is based on extra-textual considerations. Consider how we find them giving us quite a lot of information about the "Men of the Great Assembly" contemporary with these events (and mentioning Mordechai as one of its members), though their activities are barely recognizable in Tanach. Then, too, there is the Talmudic consideration that מגלגלין זכות על ידי זכאי, Hashem causes good things to happen through good people, so that from this point of view the salvation of the Jewish people and the establishment of the important holiday of Purim can hardly have been due to an assimilationist.




Some other comments:





  • The proof that follick brought from Ezra and Nechemiah (assuming, for argument's sake, that indeed it's the same Mordechai) does not represent, as you're thinking, a "potential change of heart" after the story of Purim. The verses there are talking about the first wave of Jews who returned in the wake of Cyrus' decree allowing the rebuilding of the Beis Hamikdash, a few years before the opening scene of the Megillah. We see, then, that there was someone named Mordechai in the first rank of Jewish leaders of the time.




  • Your argument (in the comments to the linked thread) that the name Mordechai, seemingly of pagan origin, demonstrates that he (or his parents) were assimilated Jews is rather weak. For one thing, the Gemara (Chullin 139b) associates it with the Aramaic expression מירא דכיא, "pure myrrh." I don't know whether the Gemara means this as an actual etymology for the name or simply an assonance, but it does at least indicate that it's not necessarily derived from a pagan source. Second, consider Antigonos of Socho, who unquestionably served as spiritual leader of Jewry (Avos 1:3) - and yet who bore a Greek name, only a couple of decades after Alexander's conquest of the country.




  • Your other argument, that the people who were exiled with Yechanyah (as Mordechai was) were semi-assimilated, also lacks any proof. Let's take the verses as given (leaving aside the midrashim on them), that they were "the carpenters and the locksmiths." Which makes them the (lower) middle class - far from the elite. Why would you assume that their commitment to Judaism was weaker than anyone else's?





particle が - Use of が in article about Midsummer Day of the Ox and selling eel


I was reading over this article about Midsummer Day of the Ox and selling eel. I'm wondering about the use of が in this sentence



この会社は今年、牛肉のステーキや、ビタミン多いしじみなども売ることにしました



Roughly: This year the company decided on selling things like beef steak, also many items like basket clams with added vitamins


Why is the が not a で? A part of me reads this as: Vitamins have many basket clams. Which definitely does not make sense



Answer





ビタミンが多いしじみ



The problem is that you are not correctly parsing this phrase.



× many items like basket clams with added vitamins
× vitamins have many basket clams
vitamin-rich basket clams



Why is that?





  1. 多い does not substitute "many"
    It's often said Japanese 多い means "many", but it's not true grammar-wise. The correct statement is 「Xが多い」 = "there are many X", that means 多い's lexical meaning, if I'm forced to put it in English, is "a large amount of X exists". And vice versa for 少ない.




  2. 多い cannot modify しじみ alone
    Due to the aforementioned semantic feature, 多い is not able to move before the noun, as Japanese adjective attribution is actually forming relative clauses. Consider, how could you form a relative clause headed by "people" from "a large amount of people exists"? For this reason, 多いX which is transformed from Xが多い is almost nonsense. Even when you apparently see such construction, it's usually some implicit subject (nominative) hidden.



    多い時期は1日1000人 = (観光客が)多い時期は1日1000人 1000 people a day during the season when there are many (visitors) [= high season]


    多い日も安心 = (経血が)多い日も安心 no worry even on a day where there are much (flow) [sanitary pad ad cliche]




    The situation is quite contrastive to English many, which cannot stand as predicate i.e. "many people" → *"the people are many".




  3. ビタミンが多い modifies しじみ
    Thus you can only interpret the clause ビタミンが多い ("there is much vitamin" or "vitamin is abundant") modifying しじみ. Japanese relative clauses allows any kind of relations between the head noun and the clause, thus you can understand it virtually as "basket clams in which vitamin is abundant".


    More grammatically correctly, the original sentence before relativization was a topic-comment structure that accepts a complete sentence in the place where English grammar only expect a predicate. This type of construction typically describes such content you use possessive expressions to convey in English.



    しじみはビタミンが多い
    As for basket clams, there is much vitamin or basket clams have much vitamin






grammar - Double subject construction?


I've recently been having trouble with constructions that seem to mark two subjects in the same clause. I've only encountered them in ~の方が... constructions, but I can't seem to make sense of them grammatically. Here are some examples:




  1. 当然、都心より郊外のほう家賃安い。 (from a vocabulary book)

  2. (人)よりも自分の方知識あると思う (from アルク)



My questions are: why are two subjects allowed here, and are there other constructions in which this happens? So far my thoughts on this are:



(a) 方 seems to be a subject, but not have a verb. So maybe this is simply be some kind of relative-clause-like construction with the noun elided away, e.g. 家賃が安い[ところだ] and 知識がある[人だ]. But this seems a little odd - I don't know of anywhere else where this is possible.


(b) The second sentence might bracket as (人)よりも自分の方が([blah]と思う), rather than ((人)よりも自分の方が[blah])と思う. This makes perfect sense, but I suspect that the と思う could be removed to leave a valid sentence, so this explanation seems a little spurious. In any case this doesn't explain the first sentence.


So I'm a little confused. Any light anyone can shed on this would be great. Thanks!



Answer



As @Flaw flawlessly explains, Japanese sentences can have clausal predicates. This is what causes what is commonly known as double-subject constructions, although I believe "clausal predicates" really illustrates the structure better.


I assume you have heard constructions like



彼は髪が長い He has long hair



Some teachers/textbooks might explain this away by saying that 彼 is a topic, not a subject, but that creates problems when you run into sentences like




彼が髪が長いんだ! He is the one with long hair!



Here the first が is an exhaustive-listing が. When multiple がs occur in a main clause, the first is usually exhaustive-listing. Note that 髪が長いのは彼だ might be more common, but I don't consider the above ungrammatical. Also, dependent/relative clauses cannot have topics, so you might see



彼が髪が長い理由は ... だ The reason for his long hair is ...



although I think in this case 彼の髪が長い理由は...だ might also be as/more common.


In your example sentence, のほう needs to have a が (This would also fall under the exhaustive-listing category) to have the comparative meaning




郊外のほうが家賃が安い Rent is cheaper in the suburbs



Changing the が to a は would lose the comparative meaning



郊外のほうは家賃が安い Rent is cheap in the suburbs



As a side note, I'm not exactly sure what the function of のほう would be in this case, I think you can see it either as a filler, or as something that directs your attention to 郊外. 郊外は家賃が安い would mean almost the same.


To address Billy's question in his comment



郊外が家賃が安い It is in the suburbs that rent is cheap




is grammatical, but quite narrow in meaning. And again, 家賃が安いのは郊外だ is probably more common to convey this meaning.


Saturday, October 26, 2019

death - Can the living negatively affect the dead?


As far as I know, living people can positively affect the dead. This is the reason we say Kaddish and learn Mishnayos for the souls of the deceased. (Feel free to comment with more examples of this.) If you want to get more mystical, there are numerous stories of tzaddikim finding tikkunim for sinful souls.



So today I read an article that mentioned how the Mormon Church posthumously baptized Simon Wiesenthal's parents, and I wondered: is it possible to negatively affect the souls of the deceased?


(Mormon posthumous baptism just provided the impetus for this question. I'm interested in the more general idea of souls being negatively affected after death.)


@DoubleAA brought up an interesting point in the comments that I didn't think of. Is a soul affected when a living person sins because of something the deceased did while alive?


Specifically, I'm wondering if there are sources that discuss this, rather than looking for personal logic and intuition.



Answer



Summary: One who drinks water on the eve of Shabbat or, according to other opinions, following mincha on Shabbat, steals water from the souls in Gehenom and thus harms them.




There is little, if any, Scriptural discussion regarding the continued life of a soul following death, therefore we are left exploring the murky depths of Midrash. I refer you to the (odd?) halachic dispute regarding drinking water on the eve of Shabbat and following mincha on Shabbat. A good discussion of the argument can be found in the book 'Kaddish' by Leon Wieseltier. Here are some excerpts [page 100-105 of first Vintage Books edition, 2000]:


The ערוגת הבושם:




.... on the Sabbath the dead are relieved of the judgment of hell. On that afternoon the souls are made to stand by a gleaming fountain of water that flows at the entrance to the garden, and then rinse themselves in the water to cool their bodies from the fire... Since the souls at that hour are standing by that fountain, the geonim and the [post-Talmudic] rabbis established the custom that we do not drink water between the afternoon service and the evening service on the Sabbath, because we would be stealing it from the dead."



The שיבולי הלקט [about]:



According to a rabbinical legend, when an individual drinks water at twilight [on the afternoon of the Sabbath], it is as if he were stealing the water from his dead. And I have found this in the responsa of the geonim: 'We have heard it said in the name of the early sages that for the duration of twilight, permission is granted to the souls of the dead to drink water. And when one drinks water at the hour when the souls of the dead are drinking water, the souls of the dead who are one's kin are not permitted to drink. For this reason, the sages said that it is as if one were stealing from one's own relatives."



The אור זרוע from Isaac of Vienna:



When the afternoon [of the Sabbath] comes... it is the practice of the righteous.... and then to eat a meal. Our Master Tam [רבנו תם] scolded them and said that it was forbidden, citing the tale in the Jerusalem Talmud about a man who drank water between the afternoon prayer and the evening prayer, and the angel of death came and slew him, because he drank when the dead were drinking and so was a robber of the dead."




The מרדכי from Mordecai ben Hillel:



... Rabbi Meshullam responded that in his text of the ancient rabbinical legend he had a different formulation. His text said that 'those who eat and drink on the afternoon of the eve of the Sabbath [steal from the dead] and the reason is that [by Friday afternoon] the dead are exhausted from the judgment they have endured all week. And for this reason he was strict about not drinking on the afternoon of the eve of the Sabbath.... And it is the custom of the whole world to be careful [about drinking the water of the dead]..."



The Bach concludes that one should not drink either Friday afternoon or Saturday afternoon.


Needless to say, the practice of refraining from drinking during these times has all but disappeared, though as can be seen above, was widely practiced in Ashkenazic lands in the Middle Ages.


grammar - Why is it である not にある in this sentence?


Today I saw this sentence: イラクで戦争がある。


I didn't understand why that would be the case instead of イラクに because if it is で I feel like it could be rewritten:


戦争はイラクである。 which just sounds like Iraq is war.


Is there a reason for this? Is it an expression or something like that, can it be rewritten the way I wrote it and if so could you say 戦争はイラクです?



Thanks for your help



Answer




イラクで戦争がある。≒ イラクで戦争が起こる。



The ある means [起]{お}こる, [発生]{はっせい}する, [行]{おこな}われる (meaning #12 in goo辞書)
Compare:



イラクにXXがある。(= There's XX in Iraq.)
イラクでXXがある。(= XX occurs/takes place/will be held in Iraq.)






Edit


戦争はイラクである。doesn't sound very natural but would mean "The war will take place in Iraq" as a response to 戦争はどこであるんだ?(Where will the war take place?). It can't be interpreted as "The war is Iraq" nor rewritten as 戦争はイラクです.


"how would you differentiate the である that shows what something is and the である that shows where something is"
>>>
I think it's all up to the context.



XXが/はYYである。




If you said 僕の故郷は京都である, then I'd interpret it as "My hometown is Kyoto". If you said 今度の会議は京都である, then I'd interpret it as "We'll have the next meeting in Kyoto".


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, ...