Re: matlab mex file (fortran)
- From: Christopher Hulbert <cchgroupmail@xxxxxxxxx>
- Date: Sat, 27 Aug 2005 08:53:38 -0400
markuj wrote:
> This is my mexopts.bat file. Is it correct?
> I send you my hypothetical fortran code too.
* snip mexopts.bat *
> -----------------------------------------------------------
> !
> ! Program Celsius Table: Prints simple Fahrenheit-Celsius table
> !
> program celsius_table
> implicit none
> real Fahrenheit, Celsius
>
> print *,' Fahrenheit Celsius'
> print *,'--------------------------'
> do Fahrenheit = 30, 220, 10
> Celsius = (5.0/9.0) * (Fahrenheit-32.0)
> print '(F13.0,F12.3)',Fahrenheit,Celsius
> end do
> end
> -----------------------------------------------------------
> mark wrote:
>
>>
>>It looks like your compiler is now setup right. Could you post
>>your
>>fortran code? It should follow this basic format.
>>
>>Subroutine mexFunction(nlhs, plhs, nrhs, prhs)
>>
>>integer nlhs, nrhs
>>integer plhs(*), prhs(*)
>>C Body
>>return
>>end
Did you even read mark's post? You should also consult the mathworks
External Interfaces Documentation. As mark pointed out, you need the
SUBROUTINE MEXFUNCTION
END SUBROUTINE
Also, I don't think you'll be able to use print from your mex functions.
You'll need to use mexPrintf
.
- References:
- matlab mex file (fortran)
- From: marcin kujawa
- Re: matlab mex file (fortran)
- From: mark
- Re: matlab mex file (fortran)
- From: markuj
- matlab mex file (fortran)
- Prev by Date: Re: Vector multiplication vs. for Loop
- Next by Date: Graphs - plots
- Previous by thread: Re: matlab mex file (fortran)
- Next by thread: Log-Logistic Distribution STATS TOOLBOX
- Index(es):
Relevant Pages
|
Loading