How can I create a function handle to a function that is private defined within a class?

2 ビュー (過去 30 日間)
Oscar Trull
Oscar Trull 2018 年 9 月 5 日
コメント済み: Oscar Trull 2018 年 9 月 10 日
I want to pass a private function handle to a variable, even within the same class, but the MATLAB answer is that there is no public field called this fn. Does anybody know if it is possible? Thanks !
  2 件のコメント
Vineeth Nair
Vineeth Nair 2018 年 9 月 10 日
Can you share your code? Because ideally you should be able to call a private method within the same class.
Oscar Trull
Oscar Trull 2018 年 9 月 10 日
Thank you, but I've solved it. The problem wasn't on the privileges themselves but on the class definition. I need to create first a class object before obtaining the function address. Sorry for the inconvenience

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

回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by