User`s guide

Plot Example
x.set(i, i);
y.set(i, i*i);
}
/* Create new plotter object */
thePlot = new plotter();
/* Plot data */
thePlot.drawplot(x, y);
}
catch (Exception e)
{
System.out.println("Exception:"+e.toString());
}
finally
{
/* Free native resources */
MWArray.disposeArray(x);
MWArray.disposeArray(y);
if (thePlot != null)
thePlot.dispose();
}
}
}
The program does the following:
Creates two arrays of double values, using
MWNumericArray to represent
thedataneededtoplottheequation.
Instantiates the
plotter clas s as thePlot object, as shown:
thePlot = new plotter();
Calls the drawplot method to plot the e quation using the M ATLAB
plot function, as shown:
thePlot.drawplot(x,y);
5-5