MATLAB Answers

0

What does @(x,y)myFunction mean?

Asked by Kristoffer Walker on 2 Jul 2019
Latest activity Commented on by Kristoffer Walker on 2 Jul 2019
Folks,
Could someone please point me to documentation that explains what the "@(x,y)" means in the below code?
@(x,y)disp('Hello World!')
Similarly, what do the following mean?
StartFcn = @(~,~)myfile
StartFcn = @myfile
StartFcn = {@myfile, 5, 6}
I am trying to get a timer to execute a specific callback in a GUIDE GUI. In order to get this to work, it seems I really need to understand that syntax.
Thank you,
Kris

  0 Comments

Sign in to comment.

Products


Release

R2017b

1 Answer

Rik
Answer by Rik
on 2 Jul 2019
Edited by Rik
on 2 Jul 2019
 Accepted Answer

The @ symbol generates either a function handle or creates an anonymous function.
You can read more on this doc page.
You third syntax is slightly less obvious. For that one you can find more information here.

  1 Comment

Outstanding; thanks Rik!

Sign in to comment.