Introduction to programming using mat lab MOOCS
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
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
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
Multi-return variable • Take care of such an error you might have to make it =D
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>
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
Examples • What about some examples my Friend 
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
Sub Functions • The call to this function with the sub function way [ formula ] is the same way as the previous one
Scope • here Is the definition of the scope
Global scope • We can make global scope [ global variable ] • As one or more Function can access the variable plus the command line

Introduction to programming using mat ab

  • 1.
  • 2.
    Rand • This functionwith 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 • Ifyou 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 inthe 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
  • 5.
    Multi-return variable • Takecare of such an error you might have to make it =D
  • 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
  • 8.
    Examples • What aboutsome examples my Friend 
  • 9.
    Sub Functions • DefiningMatrices 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 • Thecall to this function with the sub function way [ formula ] is the same way as the previous one
  • 11.
    Scope • here Isthe definition of the scope
  • 12.
    Global scope • Wecan make global scope [ global variable ] • As one or more Function can access the variable plus the command line