|
Document 173
How to import and plot data sets in SW
Version: 2.5 - Scientific WorkPlace & Scientific Word
Users sometimes want to import data sets into SW so they can use Maple or
Mathematica to create plots. Here's how to go about it:
-
Import the data into an SW document:
-
Place the insertion point where you want the data to appear.
-
From the File menu, choose
Import Contents.
-
When the dialog box appears, select the file that contains the data you want
to plot.
-
Choose Open.
Your data will appear at the insertion point in the SW document.
-
To make sure SW interprets the data as mathematics, select the imported data
and then click the Math/Text button or press ctrl+m or ctrl+t. The button
appears as
.
-
Make sure that each data item is separated from the next with a comma. Use the
search and replace feature (Edit menu) if necessary.
-
Place the data in a matrix:
-
If your data is set up so that each x value is followed by a y value, create a
single matrix:
-
Select the data.
-
From the Maple menu, choose
Matrices and then choose
Reshape.
-
In the Number of Columns entry area of the
Reshape Matrix dialog box, enter 2.
-
If your data is set up so that all the x values come before all the y values,
you must create two one-column matrices and then concatenate them:
-
Select the x values.
-
From the Maple menu, choose
Matrices and then choose
Reshape.
-
In the Number of Columns entry area of the
Reshape Matrix dialog box, enter 1.
-
Select the y values.
-
From the Maple menu, choose
Matricesand then choose
Reshape.
-
In the Number of Columns entry area of the
Reshape Matrix dialog box, enter 1.
-
Select both matrices.
-
From the Maple menu, choose
Matricesand then choose
Concatenate.
-
Place the insertion point to the immediate right of the matrix.
-
From the Maple menu, choose
Plot 2D and then choose
Rectangular.
You can modify the plot to show either a line or points, and you can change
both the range and domain to suit your needs.
Added 08/07/96; revised 09/19/03
This document was created with Scientific WorkPlace.
|