Getting a handle to a function inside a package folder

1 回表示 (過去 30 日間)
sst
sst 2012 年 2 月 16 日
Hi, suppose I want to get a handle to a function inside a package folder +mypackage.
I would have assumed that the following would work:
import mypackage.*
func = @(X) myfunction(X);
func(Y);
However, I realized that I have to explicitly specify the package name:
func = @(X) mypackage.myfunction(X);
func(Y);
Was this intended? Do I need to specify the package name everytime I try to get a handle to a function inside it? Is there a way around this?
I am using MATLAB R2010b (64-bit) on Windows 7.
Thanks.

回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by