MATLAB BUILDER JA 2 Guia do Utilizador Página 235

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 292
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 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
Vista de página 234
1 2 ... 230 231 232 233 234 235 236 237 238 239 240 ... 291 292

Comentários a estes Manuais

Sem comentários