MATLAB BUILDER JA 2 Betriebsanweisung Seite 235

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 292
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 234
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
Seitenansicht 234
1 2 ... 230 231 232 233 234 235 236 237 238 239 240 ... 291 292

Kommentare zu diesen Handbüchern

Keine Kommentare