2. Rand
• This function with out the addition operation and the multiplication
one produce random variable determined by the number inside the
brackets in the range from 0 to 1
• When he made the multiplication property he stretch the range to In
the range from 0 to 9
• After adding one he shift the range to be from 1 to 10
3. Multi-return variable
• If you want to return two variable from a function you have to follow
this Formula
• High – low
Determine the range
From low to high
4. Multi-return variable
And in the case of calling it
If you don’t use this way and only specify the result to only one variable
The second argument wouldn't be saved
6. Last Funny Example =D
• Pause ( 5 ) to pause the program for 5s before the next line executes
• Quiz : why did he use it ?!
• you can create an editor file using
edit <Editor_File_name_attribute>
7. Function Definition Form
• Let’s take a look about how can we define a function
• Quiz =D :
• What happen if I delete the commas in side these two brackets
• And these two brackets
9. Sub Functions
• Defining Matrices insides One M file & calling from one the another
one
• Let’s make the equivalent of the previous program in the sub-function
way
10. Sub Functions
• The call to this function with the sub function way [ formula ] is the
same way as the previous one