Douglas Blumeyer's RTT How-To: Difference between revisions

Fredg999 (talk | contribs)
m Fixed markup error which was hiding two subsections
Cmloegcmluin (talk | contribs)
vectors and covectors: go straight into Wolfram Language; forget about Alpha
Line 61: Line 61:
For another example, we can quickly find the fifth size for 12-EDO from its map, because 3/2 is {{vector|-1 1 0}}, and so {{map|12 19 28}}{{vector|-1 1 0}} = (12 × -1) + (19 × 1) = 7. Similarly, the major third — 5/4, or {{vector|-2 0 1}} — is simply 28 - 12 - 12 = 4.
For another example, we can quickly find the fifth size for 12-EDO from its map, because 3/2 is {{vector|-1 1 0}}, and so {{map|12 19 28}}{{vector|-1 1 0}} = (12 × -1) + (19 × 1) = 7. Similarly, the major third — 5/4, or {{vector|-2 0 1}} — is simply 28 - 12 - 12 = 4.


WolframAlpha's syntax is slightly different than what we use in RTT, but it's pretty alright for a free online tool capable of handling most of the math we need to do in RTT, so we're going to be supplementing several topics with WolframAlpha examples as we go. Here's the first:
Throughout this article I will be referring to examples implemented in [https://www.wolfram.com/language/ Wolfram Language] (formerly Mathematica), a popular and capable programming language for working with math. If you're interested in trying them out, you can run them right on the web without downloading or setting anything up on your computer: just go to https://www.wolframcloud.com, sign up for free, create a new computational notebook, paste any of these code snippets in to a cell, and Shift+Enter to run them; you'll be computing in no time.
 
If, on the other hand, you're not interested in code examples, that's no big deal. They're not necessary to follow along.  
 
So here's the first:


{| class="wikitable"
{| class="wikitable"
|+WolframAlpha code ([https://www.wolframalpha.com/input/?i=%7B12%2C19%2C28%7D.%7B-1%2C1%2C0%7D try it])
!input
!input
!output
!output
Line 71: Line 74:
|7
|7
|}
|}
Wolfram's syntax is a bit different than what we use in RTT, which can take a little getting used to. As you can see here, both our vector and covector use the same curly brackets instead of angle and square brackets. This is a very simple example, though, and the actual difference between RTT and Wolfram syntax gets more complicated than just replacing all brackets with curlies; but we won't have to worry about that for a while.


=== tempering out commas ===
=== tempering out commas ===