MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Instrukcja Użytkownika Strona 136

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 408
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 135
3 Creating Fortran MEX-Files
3-26
C $Revision: 1.12 $
C===============================================================
C
C dblmat.f
C Example for illustrating how to use %val.
C Doubles the input matrix. The demo only handles real part
C of input.
C NOTE: If your Fortran compiler does not support %val,
C use mxCopy_routine.
C
C NOTE: The subroutine compute() is in the file called
C compute.f.
C
C This is a MEX-file for MATLAB.
C Copyright (c) 1984-2000 The MathWorks, Inc.
C
C===============================================================
C Gateway subroutine
subroutine mexfunction(nlhs, plhs, nrhs, prhs)
C---------------------------------------------------------------
C (pointer) Replace integer by integer*8 on the DEC Alpha
C platform.
C
integer plhs(*), prhs(*)
integer pr_in, pr_out
integer mxGetPr, mxCreateFull
C---------------------------------------------------------------
C
integer nlhs, nrhs, mxGetM, mxGetN
integer m_in, n_in, size
if(nrhs .ne. 1) then
call mexErrMsgTxt('One input required.')
endif
if(nlhs .gt. 1) then
call mexErrMsgTxt('Cannot return more than one output.')
endif
Przeglądanie stron 135
1 2 ... 131 132 133 134 135 136 137 138 139 140 141 ... 407 408

Komentarze do niniejszej Instrukcji

Brak uwag