MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Manual de usuario Pagina 144

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 408
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 143
3 Creating Fortran MEX-Files
3-34
call mxFreeMatrix(lhs(1))
return
end
C $Revision: 1.3 $
C
================================================================
C
C fill.f
C This is the subfunction called by sincall that fills the
C mxArray with data. Your version of fill can load your data
C however you would like.
C
C This is a MEX-file for MATLAB.
C Copyright (c) 1984-2000 The MathWorks, Inc.
C
C
================================================================
C Subroutine for filling up data.
subroutine fill(pr, m, n, max)
real*8 pr(*)
integer i, m, n, max
m=max/2
n=1
do 10 i=1,m
10 pr(i)=i*(4*3.1415926/max)
return
end
It is possible to use mexCallMATLAB (or any other API routine) from within your
computational Fortran subroutine. Note that you can only call most MATLAB
functions with double-precision data. M-functions that perform computations,
like
eig, will not work correctly with data that is not double precision.
Vista de pagina 143
1 2 ... 139 140 141 142 143 144 145 146 147 148 149 ... 407 408

Comentarios a estos manuales

Sin comentarios