Extreme Graphics with Extrema
also are special characters that you can use in indexing arrays. The
x[*] refers to all the values in the vector. If you want
the last element, you can use
x[#]. The second-to-last element can be
You likely have all of your data stored in files. The simplest file format is a comma-separated list of values. Extrema can read in these types of files and store the data directly into a set of variables. If you have a file with two columns of data, you can load them into two variables with the statement:
READ file1.dat x y
You also can read in all of the data and store it into a single matrix with:
READ\matrix file1.dat m nrows
In order to do this, you need to provide the number of rows that are being read in. You also can generate data to be used in your analysis. If you simply need a series of numbers, you can use:
x = [startval:stopval:stepsize]
This will give you an array of numbers starting at
startval, incrementing by
stepsize until you reach
stopval. You can use the
to do this as well. The GENERATE command also will generate an array of random
GENERATE\RANDOM x min max num_points
Extrema has all of the standard functions available, like the various types of trigonometric functions. The standard arithmetic operators are:
+ — addition
- — subtraction
* — multiplication
/ — division
^ — exponentiation
() — grouping of terms
There also are special operators for matrix and vector operations:
>< — outer product
<> — inner product
<- — matrix transpose
>- — matrix reflect
/| — vector union
/& — vector intersection
There also is a full complement of logical Boolean operators that give true (1) or false (0) results.
Now that you have your data and have seen some of the basic functions and operators available, let's take a look at graphing this data and doing some analysis on it. The most basic type of graph is plotting a one-dimensional array. When you do this, Extrema treats the data as the y value and the array index as the x value. To see this in action, you can use:
x = [1:10:1] GRAPH x
This plots a fairly uninteresting straight line (Figure 3).
Figure 3. Plotting a Vector of Values
Joey Bernard has a background in both physics and computer science. This serves him well in his day job as a computational research consultant at the University of New Brunswick. He also teaches computational physics and parallel programming.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
- Ubuntu Online Summit
- Devuan Beta Release
- The Qt Company's Qt Start-Up
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- The US Government and Open-Source Software
- May 2016 Issue of Linux Journal
- The Death of RoboVM
- Open-Source Project Secretly Funded by CIA
- New Container Image Standard Promises More Portable Apps
- BitTorrent Inc.'s Sync
In modern computer systems, privacy and security are mandatory. However, connections from the outside over public networks automatically imply risks. One easily available solution to avoid eavesdroppers’ attempts is SSH. But, its wide adoption during the past 21 years has made it a target for attackers, so hardening your system properly is a must.
Additionally, in highly regulated markets, you must comply with specific operational requirements, proving that you conform to standards and even that you have included new mandatory authentication methods, such as two-factor authentication. In this ebook, I discuss SSH and how to configure and manage it to guarantee that your network is safe, your data is secure and that you comply with relevant regulations.Get the Guide