Difference between revisions of "What does the at symbol mean in front of a function in matlab?"

From Murray Wiki
Jump to navigationJump to search
 
 
Line 18: Line 18:
  
 
--[[User:Lindzey|Lindzey]] 18:47, 2 October 2006 (PDT)
 
--[[User:Lindzey|Lindzey]] 18:47, 2 October 2006 (PDT)
 +
 +
 +
[[Category:CDS 101/110 FAQ - Lecture 2-1]]

Latest revision as of 01:48, 3 October 2006

Q: What does the @ sign mean when it is in front of the f function in the Matlab simulation (pg. 6 of the lecture notes)?

A: (Quoting the matlab help-files) A function handle is a MATLAB value and data type that provides a means of calling a function indirectly. You can pass function handles in calls to other functions.

You construct a handle for a specific function by preceding the function name with an @ sign. Use only the function name (with no path information) after the @ sign. example: fhandle = @myfunction


For more information, open matlab's help browser and search for 'function', 'ode45', or 'function handle'

--Lindzey 18:47, 2 October 2006 (PDT)