oddity with displaying function handles
2 ビュー (過去 30 日間)
古いコメントを表示
In Matlab version 9.1, observe:
>> f = @(x)(1);
>> f = @(x)(f(x)+1)
f =
function_handle with value:
@(x)(f(x)+1)
>> f(5)
ans =
2
The oddity is: when f itself is displayed, the symbol 'f' appearing inside the display refers to an older version of f rather than the current version. Is there a way to see what is 'really' inside the function handle?
0 件のコメント
回答 (1 件)
Walter Roberson
2017 年 3 月 5 日
In a situation such as that,
s = functions(f)
s.workspace{1}.f
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!