Errors using Embeded MATLAB function block

I have a funtion in MATLAB which reads from an XML file. I'm trying to run it from simulink but I get some errors about the functions used.
Attempt to extract field 'getElementsByTagName' from 'double'. Inherited types on Simulink bus objects are currently unsupported; to access a Simulink bus you need to set the input type explicitly in the Ports and Data Manager.
Attempt to extract field 'getFirstChild' from 'double'. Inherited types on Simulink bus objects are currently unsupported; to access a Simulink bus you need to set the input type explicitly in the Ports and Data Manager.
....
How can I solve this problem?
Thanks for all
Nerea

回答 (2 件)

Kaustubha Govind
Kaustubha Govind 2012 年 11 月 30 日

0 投票

Are you trying to pass in a structure/Bus signal as input to your MATLAB Function block? If so, you need to define the input type using a Simulink.Bus object. See Attach Bus Signals to MATLAB Function Blocks.
Nerea
Nerea 2012 年 12 月 3 日

0 投票

The function runs properly in MATLAB without input signals, but when I copy it in a MATLAB Function block many errors appear realted to fields used to read XML.

1 件のコメント

Kaustubha Govind
Kaustubha Govind 2012 年 12 月 27 日
Nerea: Please read from the link in my answer. It still applies to your situation.

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

カテゴリ

ヘルプ センター および File ExchangeProgrammatic Model Editing についてさらに検索

製品

タグ

質問済み:

2012 年 11 月 30 日

Community Treasure Hunt

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

Start Hunting!

Translated by