User Tools

Site Tools


en:cycle_and_function

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
en:cycle_and_function [2015/02/15 22:09]
David Zelený [Use of loop]
en:cycle_and_function [2017/10/11 20:36] (current)
Line 30: Line 30:
 </​code>​ </​code>​
  
-will randomly select one value from the vector, containing numbers ''​-1''​ and ''​1'',​ in this case value ''​-1''​. You just made the first step to the right.+will randomly select one value from the vector, containing numbers ''​-1'' ​ and ''​1'',​ in this case value ''​-1''​. You just made the first step to the right.
  
 Vector ''​steps.rw''​ contains only zeroes: Vector ''​steps.rw''​ contains only zeroes:
Line 46: Line 46:
 </​code>​ </​code>​
  
-You may have realized that in function ''​sample'',​ there are no names of arguments (''​x''​ and ''​size''​) - they are not needed, until you write the values for arguments in the defined order (what is this order you can check in the help to the function ''​sample'',​ which you call typing ''?​sample''​).+You may have realized that in function ''​sample'',​ there are no names of arguments (''​x'' ​ and ''​size''​) - they are not needed, until you write the values for arguments in the defined order (what is this order you can check in the help to the function ''​sample'',​ which you call typing ''?​sample''​).
  
 Further steps can be defined in the following way: Further steps can be defined in the following way:
Line 89: Line 89:
 </​code>​ </​code>​
  
-The figure is not here, because for each run the figure looks different. Argument ''​x''​ in the function ''​plot''​ contains values you want to draw. Theoretically,​ the arguments should be two, ''​x''​ and ''​y'',​ i.e. the values for x and y axis; if the ''​y''​ argument is missing, the function proceeds as following: the values of ''​x''​ argument are drawn on vertical axis, and horizontal axis is represented by the order of values in the vector.+The figure is not here, because for each run the figure looks different. Argument ''​x''​ in the function ''​plot''​ contains values you want to draw. Theoretically,​ the arguments should be two, ''​x'' ​ and ''​y'',​ i.e. the values for x and y axis; if the ''​y''​ argument is missing, the function proceeds as following: the values of ''​x''​ argument are drawn on vertical axis, and horizontal axis is represented by the order of values in the vector.
  
 FIXME FIXME
en/cycle_and_function.1424009363.txt.gz · Last modified: 2017/10/11 20:36 (external edit)