Redian新闻
>
请问fortran里可不可以调用Matlab函数?
avatar
请问fortran里可不可以调用Matlab函数?# Computation - 科学计算
l*t
1
怎么调用,实在是不知道该怎么链接
btw 多次调用大概有10k次
这样是不是很影响速度>
avatar
l*t
2
或者matlab里想用fortran编的一个程序该怎么调用
thanks!

【在 l**t 的大作中提到】
: 怎么调用,实在是不知道该怎么链接
: btw 多次调用大概有10k次
: 这样是不是很影响速度>

avatar
i*d
3
Definitely you can call matlab from Fortran by matlab engine open. I did this
before.
I think you may find an example in the help files of Fortran, one point you
need to be careful about is when you debug the fortran codes, you have to add
all of the related matlab library function into the current fortran project.
otherwise, you will get so many link problems.
good luck

【在 l**t 的大作中提到】
: 怎么调用,实在是不知道该怎么链接
: btw 多次调用大概有10k次
: 这样是不是很影响速度>

avatar
l*s
4
most recommendation:
under MATLAB,type
help mex
help mbuild

~~~~
这个算不上啥,不过如果中间数据so多的话就不好说了,看你的cpu和ram了。
另外matlab中的function要加mx前缀,
例如:mxDestroyArray
等等了,

【在 l**t 的大作中提到】
: 怎么调用,实在是不知道该怎么链接
: btw 多次调用大概有10k次
: 这样是不是很影响速度>

avatar
l*t
5

没看懂,直接在fortran里写mxFunctionName吗>
要求matlab和fortran在一个目录里吗?
bow

【在 l***s 的大作中提到】
: most recommendation:
: under MATLAB,type
: help mex
: help mbuild
:
: ~~~~
: 这个算不上啥,不过如果中间数据so多的话就不好说了,看你的cpu和ram了。
: 另外matlab中的function要加mx前缀,
: 例如:mxDestroyArray
: 等等了,

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。