Web Home
Getting Started
Manual
Quick Reference
Language Reference
Function Reference
I/O Reference

Language Reference Function Reference Including Source Files Comments Issuing Shell Commands Matrix Multiplication Information About Variables Elementary Functions Advanced Array Indexing Index Range Functions Logical Functions Interpolation and Lookup Functions Sorting Transposing Manipulating Strings Generating Simple Meshes Using Pointers Instancing Data Structures Reshaping Arrays I/O Reference | # Yorick Function Reference ## Generating Simple Meshes Many Yorick calculations begin by defining an array of x values which will be used as the argument to functions of a single variable. The easiest way to do this is with the `span` or `spanl` function: `x = span(x_min, x_max, 200);` This gives 200 points equally spaced from `x_min` to `x_max`. A two dimensional rectangular grid is most easily obtained as follows: `x = span(x_min, x_max, 50)(, -:1:40);` `y = span(y_min, y_max, 40)(-:1:50, );` This gives a 50-by-40 rectangular grid with `x` varying fastest. Such a grid is appropriate for exploring the behavior of a function of two variables. Higher dimensional meshes can be built in this way, too.