Cannot create a pointer to a struct

1 回表示 (過去 30 日間)
Mikael Agopov
Mikael Agopov 2020 年 3 月 27 日
コメント済み: Steven Lord 2020 年 3 月 27 日
I never needed to create a pointer in Matlab before, but now I need to create a pointer to a struct.
I tried:
exstr=struct('Value1',10,'Value2',20)
exstr_ptr=libpointer('struct',exstr)
or
exstr_ptr=libpointer('structure',exstr)
Both give an error 'Type not found'.
However, using the same syntax with int or float works fine.
What is the problem

回答 (1 件)

Mohammad Sami
Mohammad Sami 2020 年 3 月 27 日
編集済み: Mohammad Sami 2020 年 3 月 27 日
  2 件のコメント
Mikael Agopov
Mikael Agopov 2020 年 3 月 27 日
This is only available in matlab2020a?
Steven Lord
Steven Lord 2020 年 3 月 27 日
According to the documentation page libstruct was "Introduced before R2006a" so no, it's not new in release R2020a. The links including R2020a in the URL means they will always refer to the release R2020a version of the documentation page. So if you're using an older release, in case libstruct has changed between your release and release R2020a (I don't remember if it's changed recently) you probably want to refer to your locally installed documentation.

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by