Products & Services Industries Academia Support User Community Company

Learn more about MATLAB   

filemarker - Character to separate file name and internal function name

Syntax

M = filemarker

Description

M = filemarker returns the character that separates a file and a within-file function name.

Examples

On the Microsoft Windows platform, for example, filemarker returns the '>' character:

filemarker
ans =
   >

You can use the following command on any platform to get the help text for subfunction pdeodes defined in M-file pdepe.m:

helptext = help(['pdepe' filemarker 'pdeodes'])

helptext =
 PDEODES  Assemble the difference equations and 
    evaluate the time derivative for the ODE system. 

You can use the filemarker character to indicate a location within an M-file where you want to set a breakpoint, for example. On all platforms, if you need to distinguish between two nested functions with the same name, use the forward slash (/) character to indicate the path to a particular instance of a function.

For instance, suppose an M-file, myfile.m, contains the following code:

function x = A(p1, p2)
...
		function y = B(p3)
    ...
		end
		function m = C(p4)
    ...
    end
end

function z = C(p5)
...
		function y = D(p6)
    ...
		end
end 

To indicate that you want to set a breakpoint at function y nested within function x, use the following command on the Windows platform:

dbstop myfile>x/y

To indicate that you want to set a breakpoint at function m nested within function x use the following command on the Windows platform:

dbstop myfile>m

In the first case, you specify x/y because the M-file contains two nested functions named y. In the second case, there is no need to specify x/m because there is only one function m within myfile.m.

See Also

filesep

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS