bad lexical cast: source type value could not be interpreted as target

30 ビュー (過去 30 日間)
Thibault Imbert
Thibault Imbert 2021 年 5 月 28 日
回答済み: Sreeram 2025 年 1 月 22 日
Hello,
I am currently trying to simulate a robot dog that I have created on Autodesk Inventor. I would like to do a physical simulation on Simscape Multibody. I have downloaded the plug-in to convert the model, it works. However, when I import the model from Matlab to Simulink via the "smimport('file_name')" command, it does not work. Matlab indicates "bad lexical cast: source type value could not be interpreted as target". I have already changed the region parameters from "," to "." and it worked the first time for a test 3D model. Now that I want to import larger files (like the leg I've attached), Matlab shows this error message again. So I tried again with the region settings but it didn't work. Can anyone answer my problem?
  4 件のコメント
Takavarasha Desire
Takavarasha Desire 2023 年 9 月 23 日
Thanks! It worked for me!
Simone Acerbi
Simone Acerbi 2024 年 2 月 18 日
Is there a solution to the issue? I'm also experiencing the same issue even though the formatting for the numerical value is correctly set.

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

回答 (1 件)

Sreeram
Sreeram 2025 年 1 月 22 日
Hi Thibault,
This is a bug caused by a decimal issue as a MathWorks staff mentioned here:
The workaround is to replace all "," with "." in the XML file.
Thank you

カテゴリ

Help Center および File ExchangeSimscape Multibody についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by