www.omatrix.com





:: O-Matrix ::
> Overview
> Examples
> Performance
> Analysis Functions
> Data Visualization
> The O-Matrix Language
> Data Manipulation/IO
> Application Development
> Using Matlab m-files




ERFX.OMS

Script File:
# Description:
# Prints a table of error function values.
#
# The error function is defined as:
# 2 / sqrt(pi) * integral from 0 to x of exp( - t^2) dt
#
clear
# grid of x values from 0. to 1.5. The colon notation
# may not include the last point because of roundoff.
x = 0d0 : .1d0 : 1.5d0
# corresponding error function values
y = erf(x)
# format for printing
format double "f15.7"
# Place title for x right justified in a 15 column field
# and title for y right justified in a 16 column field.
# The field for x is smaller because there is no leading
# space before the x value printed.
print align("x, erf(x)", ", ", [15, 16], "right")
# use write instead of print to suppress braces and brackets
write("screen", [x, y])
	  

Output:
              x          erf(x) 
      0.0000000       0.0000000
      0.1000000       0.1124629
      0.2000000       0.2227026
      0.3000000       0.3286268
      0.4000000       0.4283924
      0.5000000       0.5204999
      0.6000000       0.6038561
      0.7000000       0.6778012
      0.8000000       0.7421010
      0.9000000       0.7969082
      1.0000000       0.8427008
      1.1000000       0.8802051
      1.2000000       0.9103140
      1.3000000       0.9340079
      1.4000000       0.9522851
      1.5000000       0.9661051
	  


Company |  Products |  Showcase |  Support |  Ordering
Copyright© 1994-2009 Harmonic Software Inc. - All rights reserved.