display of variables using @

I have a variable in for loop , V.
V defined as,
V=@(x ) 5.*sign(r.^2 +x.^2);
where r=0.1;
How to display the V in command window? IS it possible?
Or any other ways to know the changes in V?

回答 (1 件)

Walter Roberson
Walter Roberson 2021 年 2 月 14 日

1 投票

disp(v)
But it will just display the formula, and will not display the r value that was saved in the function handle. To see the r value you need to use functions(v) and extract the information from the structure returned.

カテゴリ

ヘルプ センター および File ExchangeStructures についてさらに検索

質問済み:

2021 年 2 月 14 日

回答済み:

2021 年 2 月 14 日

Community Treasure Hunt

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

Start Hunting!

Translated by