College of Engineering Logo Web Server Logs Student Server Logs Orange bar Main Page General Information Special Events Programs Research Student Information Computer Facility Outreach Xtreme Engineering Jobs Available

Defining your own functions

Computer Facility University of Hawaii at Manoa
College of Engineering

In Gnuplot, you can define your own functions. Functions are defined using C programming-style definitions, with the same operators and C math library, functions, with the exception of the **, operator, which is the exponentiation. For your reference, a list of built-in functions and operators are provided here.

Here is an example of the definition of a sinc function. (The sinc function is defined as the sine of pi times x divided by pi times x, and is used typically in communications applications.)

sinc(x) = sin(pi * x) / (pi * x)
The value pi is a predefined value.

Author: Ben Yoshino (ben@wiliki.eng.hawaii.edu)

Comments, Questions? | E-mail: webmaster@wiliki.eng.hawaii.edu


Last updated on Thursday, August %.1d, 2002
Copyright © 2001 University of Hawai`i, College of Engineering, Computer Facility
All rights reserved.