MATLAB BUILDER JA 2 Guía de usuario Pagina 243

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 292
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 242
Spectral Analysis Example
The program does the following:
Constructs an input array with values representing a random signal
with two sinusoids at 15 and 40 Hz embedded inside of it
Creates an
MWNumericArray array that contains the data, as shown:
data = MWNumericArray.newInstance(dims, MWClassID.DOUBLE, MWComplexity.REAL);
Instantiates a fourier object
Calls the
plotfft method, w hich calls computeftt and plots the data
Uses a
try/catch block to handle exceptions
Frees native resources using
MWArray methods
7 Compile the powerspect.java application using javac.
a. Open a Command P rompt window and
cd to the
matlabroot\work\spectralanalysis directory.
b. On Windows, execute the fo llo wing command:
javac -classpath
.;
matlabroot\java\jar\toolbox\javabuilder.jar;
.\distrib\spectralanalysis.jar powerspect.java
c. On UNIX, execute the following command:
javac -classpath
.:
matlabroot/java/jar/toolbox/javabuilder.jar:
./distrib/spectralanalysis.jar powerspect.java
Note For matl abroot substitute the MATLAB root directory on your
system. Type
matlabroot to see this directory name.
8 Run the application
On Windows, execute the
powerspect class file as follows:
java -classpath
5-13
Vista de pagina 242
1 2 ... 238 239 240 241 242 243 244 245 246 247 248 ... 291 292

Comentarios a estos manuales

Sin comentarios