Matlab Function in Simulink not allowing fortran scientific notation?

6 ビュー (過去 30 日間)
Wiley Mosley
Wiley Mosley 2018 年 8 月 30 日
回答済み: Wiley Mosley 2019 年 6 月 13 日
--Edited for clarity--
In Simulink you can create a constant block with a value of 3.14D2 which will lead to an output of 314.
In Matlab you can create a constant with a value of 3.14D2 which will also give an output of 314.
However, when you place a matlab function block in a simulink model and within that function you define a variable equal to 3.14D2 the resulting output is 3.14
Is there something I am needing to change to allow this function within a model to work correctly without manually changing the 3.14D2 to 3.14E2? Is there a setting to reinstate this functionality of utilizing Fortran notation in Matlab 2017b?
Summary: Functions originally in Fortran, recreated in matlab function blocks (2015a), attempting to update to 2017b. Lots of functions, lots of variables, was not originally written by me.
I would expect Matlab + Simulink to handle this gracefully, but it does not.
  14 件のコメント
Wiley Mosley
Wiley Mosley 2018 年 9 月 4 日
Yes, utilizing the debug features inside the matlab function inside the simulink model y=3.14D2 results in value of 3.14.
dpb
dpb 2018 年 9 月 4 日
編集済み: dpb 2018 年 9 月 5 日
Yeech! As James said, that's nasty!
Bug city, indeed. :(
This one will be most interesting to see what TMW's response is if it is, in fact, perceived as anything but a bug.

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

採用された回答

Wiley Mosley
Wiley Mosley 2019 年 6 月 13 日
This was successfully addresed in a bug fix and update to 2019a.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFortran with MATLAB についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by