Thanks for sharing this! I donāt know who the intended audience is, but as a beginner, Iād really appreciate some explanation of not just the āwhat is happeningā which you do include, but also āhow it is happeningā.
For example, I can (sort of) make sense of the first statement:
ā Create some data for us to sample
āāV ā 5?10
as
Draw 5 random numbers from 1 to 10 and assign to V and also display to screen.
But, for the next one, things get tricky for me:
ā Get random sample of indexes
āāSā?10/ā“V
So I tried to work through it, but not knowing where the logical boundaries are, I just went from right to left.
`ā“V` just gives me 5 which means it must be just the length of the V vector.
`/ā“V` gives me error ... which tells me I need to have something to the left
`10/ā“V` gives me a 10 item vector filled with 5's
`?10 /ā“V` gives me a 10 item vector with random values between 1 to 5
But then the question is: Where are the logical boundaries? are ?10
and ā“V
LHS and RHS to operator (or function) ā/
ā ?
So, as you can see, not knowing ātrainsā and precedence rules for all the operators involved (or even not knowing whether the thing Iām looking at is an operator or function, and in what role it is being used,) itās slow going for newcomers.
If there were some basic comments on not just the āwhatās happeningā but also āhow itās happening and why itās happening the way itās happening?ā , it would help immensely towards understanding, but then again, it all depends on the audience, and if itās not meant for the newbs, then thatās fine too, please ignore.