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

조회 수: 6 (최근 30일)
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 CenterFile Exchange에서 JSON Format에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by