MATLAB BUILDER JA 2 Guide de l'utilisateur Page 235

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 292
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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
Vue de la page 234
1 2 ... 230 231 232 233 234 235 236 237 238 239 240 ... 291 292

Commentaires sur ces manuels

Pas de commentaire