matlab built in function missing from stand alone application

3 次查看(过去 30 天)
I'm trying to build a standalone application that filters a signal. the GUI runs fine from matlab but when I use the deploytool the generated .exe returns the error "undefined function or method filter" I tried to add the path to the filter function but when I run which filter,it returns this path
which filter
built-in (C:\Program Files\MATLAB\R2011a\toolbox\matlab\datafun\@single\filter) % single method
and the path doesn't exist Does anybody know how to fix this problem? Thanks

回答(1 个)

Dinghuan Zhu
Dinghuan Zhu 2014-7-21
The function “which” does not display the source file locations for MATLAB built-in functions. Your result of the “which” command for “filter” looks normal.
I think the error “undefined function or method filter” you got is caused by missing MATLAB Compiler Runtime (MCR) or the incorrect version of MCR on your target computer where you want to run the filter GUI executable generated by DEPLOYTOOL.
The MATLAB Compiler Runtime is a standalone set of shared libraries that enables the execution of MATLAB files on computers without an installed version of MATLAB. You need to have MCR installed on your target computer in order to run your standalone filter GUI application. Otherwise, the standalone executable on your target computer is not able to locate the required MATLAB built-in functions such as “filter” you are using. Error messages like “undefined function or method…” may be issued.
Also, make sure that the version of MCR you are installing on the target computer matches the version of MATLAB that the application was created in.
You may refer to the following documentation on how to deploy standalone applications on computers without MATLAB using MCR (for MATLAB R2011a):
  2 个评论
Anis
Anis 2014-7-22
Thanks for you answer, I have matlab r2011a and mcr V7.17 installed. could it be some issue with the 64bit version?
Dinghuan Zhu
Dinghuan Zhu 2014-7-22
The correct MCR version for MATLAB R2011a is 7.15. You have to downgrade the installed MCR in order for your standalone application to work with MATLAB R2011a.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by