Simulink warning and error in mex s-function

Hi,
I have installed Matlab 2008b in a linux CentOS 5.7.
I got the warning message ' warning undefined variable "xmlcomp" or class "xmlcomp.register" ' when I start the simulink.
Then I got an error: 'Error while obtaining sizes from MEX S-function 'flab_sfun_FCS' in 'flab_sfuntmpl_FCS_test/S-function'. MATLAB error message: ... ' from S-function in Simulink. (The simulink file works well in other machine. I took the simulink file ".mdl" and source code of the mex file in and complied the mex file in this machine)
-About the warning, I am not sure if this warning has anything to do with the error or not. But could you please advise how to correct it?
-About the error, could you please advise how I can solve this error?
Thank you.

 採用された回答

Kaustubha Govind
Kaustubha Govind 2011 年 11 月 2 日

0 投票

For the warning, try running "rehash toolboxcache" at the MATLAB prompt, and then clear the checkbox under Start->Preferences->General->Toolbox path caching->Enable toolbox path cache. Then restart MATLAB and see if that fixes the warning.
The S-function error that you see appears unrelated however. Could you please post the complete error message? The part after "MATLAB error message", which you have left out is what will actually give you an indication of what went wrong.

5 件のコメント

Thanan
Thanan 2011 年 11 月 2 日
Thank you very much for your response.
I tried the method you mentioned but it couldn't fix the warning.
The full warning message is:
Warning: Undefined variable "xmlcomp" or class "xmlcomp.register
> In sl_refresh_customizations>call_all at 91
In sl_refresh_customizations at 52
In slcustomize at 4
In simulinkrc at 39
And the full error message is:
Error while obtaining sizes from MEX S-function 'flab_sfun_FCS' in 'flab_sfuntmpl_FCS_test/S-function'. MATLAB error message: Invalid MEX-file 'home/FL/test-2011-02-09/ex/flab_stun_FCS.mexglx': home/FL/test-2011-02-09/ex/flab_stun_FCS.mexglx: cannot restore segment prot after reloc: Permission denied.
Kaustubha Govind
Kaustubha Govind 2011 年 11 月 2 日
The error seems to a Linux related issue (not that MEX files are essentially shared libraries and equivalent to .so files): http://fedoraforum.org/forum/showthread.php?t=214976
Thanan
Thanan 2011 年 11 月 3 日
Thank you, Kaustubha.
Disabling the SELinux could remove the error. But it seems to be a bad option. I will try other methods in the forum and let you know the result.
About the warning, do you any other method to fix it?
Kaustubha Govind
Kaustubha Govind 2011 年 11 月 4 日
Thanan: I'm not aware of any other way to fix the warning - did the one I suggested not work for you? If not, please try contacting MathWorks Tech Support.
Thanan
Thanan 2011 年 11 月 4 日
Thank you very much, Kaustubha.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeBlock and Blockset Authoring についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by