Filter löschen
Filter löschen

display of variables using @

3 Ansichten (letzte 30 Tage)
632541
632541 am 14 Feb. 2021
Beantwortet: Walter Roberson am 14 Feb. 2021
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?

Antworten (1)

Walter Roberson
Walter Roberson am 14 Feb. 2021
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.

Kategorien

Mehr zu Function Creation finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by