S-Function Builder - Integer and decimal part

9 ビュー (過去 30 日間)
MAGDALINI
MAGDALINI 2023 年 6 月 12 日
編集済み: Lakshya 2023 年 6 月 18 日
I am using S-Function Builder and I am trying to extract the integer and the decimal part of an inserted signal by using the modf function like that:
  • *ref_decimal_up = modf(*ref_up, &*ref_integer_up);
It seems that this method doesn't work. I have tried also this:
  • int* ref_integer_up = (int*)ref_up;
  • double* ref_decimal_up = *ref_up - *ref_integer_up;
Unfortunately that doesn't work either. Do you have any idea?
Thank you in advance!

回答 (1 件)

Lakshya
Lakshya 2023 年 6 月 16 日
編集済み: Lakshya 2023 年 6 月 18 日
Hi,
This couldn't be executed in MATLAB as it contains a reference pointer (*) operator, which isn't supported in MATLAB syntax.
Hope this helps.

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by