coder.extrinsic may not occur inside an expression. It may only occur at the top-level.

5 ビュー (過去 30 日間)
Lukas Polacek
Lukas Polacek 2020 年 8 月 17 日
回答済み: Mark McBroom 2020 年 8 月 21 日
Hi,
I have a problem.
I need to create matlab funcion that transforms data to jsom format. I use jsonencode, but it is matlab function so i need to use coder.extrinsic function but it doesn't work in simulink block of matlab function and gives me this error. I need to transorm data to json and then send them to kosimualtion. How can I fix it.
Thanks

回答 (1 件)

Mark McBroom
Mark McBroom 2020 年 8 月 21 日
coder.extrinsic('jsonencode');
jdata - jsonencode(data);

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by