411 REFERENCE · Wikibooks
Julia for MATLAB Users/Core Language/Advanced Software Development
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
Advanced Software Development
Creating Classes
Class Syntax Guide
class Determine class of object
In Julia typeof() is essentially equivalent.
isobject Determine if input is MATLAB object
enumeration Class enumeration members and names
events Event names
methods Class method names
properties Class property names
Sample Class Implementations
classdef Class definition keywords
Class Definition
Class File Organization
classdef Class definition keywords
import Add package or class to current import list
Properties
properties Class property names
isprop Determine if property of object
mustBeFinite Validate that value is finite or issue error
mustBeGreaterThan Validate that value is greater than another value or issue error
mustBeGreaterThanOrEqual Validate that value is greater than or equal to another value or issue error
mustBeInteger Validate that value is integer or issue error
mustBeLessThan Validate that value is less than another value or issue error
mustBeLessThanOrEqual Validate that value is less than or equal to another value or issue error
mustBeMember Validate that value is member of specified set
mustBeNegative Validate that value is negative or issue error
mustBeNonempty Validate that value is nonempty or issue error
mustBeNonNan Validate that value is nonNaN
mustBeNonnegative Validate that value is nonnegative or issue error
mustBeNonpositive Validate that value is nonpositive or issue error
mustBeNonsparse Validate that value is nonsparse or issue error
mustBeNonzero Validate that value is nonzero or issue error
mustBeNumeric Validate that value is numeric or issue error
mustBeNumericOrLogical Validate that value is numeric or logical or issue error
mustBePositive Validate that value is positive or issue error
mustBeReal Validate that value is real or issue error
dynamicprops Superclass for classes that support dynamic properties
meta.DynamicProperty Describe dynamic property of MATLAB object
event.DynamicPropertyEvent Event data for dynamic property events
meta.property Describe property of MATLAB class
meta.Validation Describes property validation
meta.FixedDimension Fixed dimension in property size specification
meta.UnrestrictedDimension Unrestricted dimension in property size specification
meta.ArrayDimension Size information for property validation
matlab.lang.OnOffSwitchState Represent on and off states with logical values
Methods
methods Class method names
ismethod Determine if method of object
meta.method Describe method of MATLAB class
Handle Classes
isequal Determine array equality
eq Determine equality
handle Superclass of all handle classes
matlab.mixin.SetGet Provide handle classes with set and get methods
matlab.mixin.SetGetExactNames Require exact name match for set and get methods
dynamicprops Superclass for classes that support dynamic properties
matlab.mixin.Copyable Superclass providing copy functionality for handle objects
Events
events Event names
handle.notify Notify listeners that event is occurring
handle.addlistener Create event listener bound to event source
handle.listener Create event listener without binding to event source
event.hasListener Determine if listeners exist for event
event.EventData Base class for event data
event.listener Class defining listener objects
event.PropertyEvent Data for property events
event.proplistener Define listener object for property events
Class Hierarchies
Subclass Definition
superclasses Names of superclasses
matlab.mixin.Heterogeneous Superclass for heterogeneous array formation
Enumerations
enumeration Class enumeration members and names
isenum Determine if variable is enumeration
meta.EnumeratedValue Describe enumeration member of MATLAB class
Class Customization
Object Indexing
numArgumentsFromSubscript Number of arguments for customized indexing methods
subsref Redefine subscripted reference for objects
subsasgn Redefine subscripted assignment
subsindex Convert object to array index
substruct Create structure argument for subsasgn or subsref
builtin Execute built-in function from overloaded method
Object Arrays
empty Create empty array
matlab.mixin.Heterogeneous Superclass for heterogeneous array formation
Customize Object Display for Classes
display Used internally for command-window display
details Display array details
matlab.mixin.CustomDisplay Interface for customizing object display
matlab.mixin.util.PropertyGroup Custom property list for object display
Object Save and Load
saveobj Modify save process for object
loadobj Customize load process for objects
Class Editing
edit Edit or create file
Class Introspection and Metadata
metaclass Obtain meta.class object
meta.abstractDetails Find abstract methods and properties
meta.class.fromName Return meta.class object associated with named class
meta.package.fromName Return meta.package object for specified package
meta.package.getAllPackages Get all top-level packages
properties Class property names
methods Class method names
events Event names
superclasses Names of superclasses
meta.class Describe MATLAB class
meta.property Describe property of MATLAB class
meta.method Describe method of MATLAB class
meta.event Describe event of MATLAB class
meta.package Describe MATLAB package
meta.DynamicProperty Describe dynamic property of MATLAB object
meta.EnumeratedValue Describe enumeration member of MATLAB class
meta.MetaData Superclass for MATLAB object metadata
meta.ArrayDimension Size information for property validation
meta.Validation Describes property validation
meta.FixedDimension Fixed dimension in property size specification
meta.UnrestrictedDimension Unrestricted dimension in property size specification
System Objects
Use System Objects
step Run System object algorithm
clone Create duplicate System object
isLocked Determine if System object is in use
nargin Number of input arguments for System object
nargout Number of output arguments for System object
reset Reset internal states of System object
release Release resources and allow changes to System object property values and input characteristics
Create System Objects
matlab.System Base class for System objects
matlab.system.StringSet Set of valid character vector values
matlab.system.mixin.FiniteSource Finite source mixin class
Calling External Functions
Call MEX File Functions
mexext Binary MEX file-name extension
inmem Names of functions, MEX-files, classes in memory
Call C Shared Libraries
loadlibrary Load C/C++ shared library into MATLAB
unloadlibrary Unload shared library from memory
libisloaded Determine if shared library is loaded
calllib Call function in shared library
libfunctions Return information on functions in shared library
libfunctionsview Display shared library function signatures in window
libstruct Convert MATLAB structure to C-style structure for use with shared library
libpointer Pointer object for use with shared library
lib.pointer Pointer object compatible with C pointer
Call Java Libraries
import Add package or class to current import list
isjava Determine if input is Java object
javaaddpath Add entries to dynamic Java class path
javaArray Construct Java array object
javachk Error message based on Java feature support
javaclasspath Return Java class path or specify dynamic path
javaMethod Call Java method
javaMethodEDT Call Java method from Event Dispatch Thread (EDT)
javaObject Call Java constructor
javaObjectEDT Call Java constructor on Event Dispatch Thread (EDT)
javarmpath Remove entries from dynamic Java class path
usejava Determine if Java feature is available
matlab.exception.JavaException Capture error information for Java exception
Call .NET Libraries
Getting Started with Microsoft .NET
NET.addAssembly Make .NET assembly visible to MATLAB
NET.isNETSupported Check for supported Microsoft .NET Framework
NET Summary of functions in MATLAB .NET interface
enableNETfromNetworkDrive Enable access to .NET commands from network drive
NET.Assembly Members of .NET assembly
NET.NetException Capture error information for .NET exception
Data Types
cell Cell array
NET.createArray Array for nonprimitive .NET types
NET.disableAutoRelease Lock .NET object representing a RunTime Callable Wrapper (COM Wrapper) so that MATLAB does not release COM object
NET.enableAutoRelease Unlock .NET object representing a RunTime Callable Wrapper (COM Wrapper) so that MATLAB releases COM object
Properties
NET.setStaticProperty Static property or field name
Events and Delegates
BeginInvoke Initiate asynchronous .NET delegate call
EndInvoke Retrieve result of asynchronous call initiated by .NET System.Delegate BeginInvoke method
Combine Convenience function for static .NET System.Delegate Combine method
Remove Convenience function for static .NET System.Delegate Remove method
RemoveAll Convenience function for static .NET System.Delegate RemoveAll method
Enumerations
bitand Bit-wise AND
bitor Bit-wise OR
bitxor Bit-wise XOR
bitnot .NET enumeration object bit-wise NOT instance method
Generic Classes
NET.convertArray Convert numeric MATLAB array to .NET array
NET.createGeneric Create instance of specialized .NET generic type
NET.invokeGenericMethod Invoke generic method of object
NET.GenericClass Represent parameterized generic type definitions
Call COM Objects
actxserver Create COM server
actxcontrol Create Microsoft ActiveX control in figure window
actxcontrollist List currently installed Microsoft ActiveX controls
actxcontrolselect Create Microsoft ActiveX control from UI
eventlisteners List event handler functions associated with COM object events
methodsview View class methods
registerevent Associate event handler for COM object event at run time
unregisterallevents Unregister all event handlers associated with COM object events
unregisterevent Unregister event handler associated with COM object event at run time
iscom Determine whether input is COM or ActiveX object
isevent Determine whether input is COM object event
isinterface Determine whether input is COM interface
COM Access COM components and ActiveX controls from MATLAB
Call Python Libraries
Getting Started
pyversion Change default version of Python interpreter
pyargs Create keyword argument for Python function
matlab.exception.PyException Capture error information for Python exception
Data Types
pyargs Create keyword argument for Python function
Functions
pyargs Create keyword argument for Python function
Calling Web Services
HTTP Interface
matlab.net.http.RequestMessage HTTP request message
matlab.net.http.ResponseMessage HTTP response message
matlab.net.http.Message HTTP request or response message
matlab.net.http.MessageType HTTP message type
matlab.net.http.MessageBody Body of HTTP message
matlab.net.http.ProtocolVersion HTTP protocol version
matlab.net.http.RequestLine First line of HTTP request message
matlab.net.http.RequestMethod HTTP request method
matlab.net.http.StartLine First line of HTTP message
matlab.net.http.StatusClass Status class of HTTP response
matlab.net.http.StatusCode Status code in HTTP response
matlab.net.http.StatusLine First line of HTTP response message
matlab.net.http.HeaderField Header field of HTTP message
matlab.net.http.field.AcceptField HTTP Accept header field
matlab.net.http.field.AuthenticateField HTTP WWW-Authenticate or Proxy-Authenticate header field
matlab.net.http.field.AuthenticationInfoField HTTP Authentication-Info header field in response message
matlab.net.http.field.AuthorizationField HTTP Authorization or Proxy-Authorization header field
matlab.net.http.field.ContentDispositionField HTTP Content-Disposition header field
matlab.net.http.field.ContentLengthField HTTP Content-Length field
matlab.net.http.field.ContentLocationField HTTP Content-Location header field
matlab.net.http.field.ContentTypeField HTTP Content-Type header field
matlab.net.http.field.CookieField HTTP Cookie header field
matlab.net.http.field.DateField HTTP Date header field
matlab.net.http.field.GenericField HTTP header field with any name and value
matlab.net.http.field.GenericParameterizedField GenericField to support parameterized syntax
matlab.net.http.field.HTTPDateField HTTP header field containing date
matlab.net.http.field.IntegerField Base class for HTTP header fields containing nonnegative integers
matlab.net.http.field.LocationField HTTP Location header field
matlab.net.http.field.MediaRangeField Base class for HTTP Content-Type and Accept header fields
matlab.net.http.field.SetCookieField HTTP Set-Cookie header field
matlab.net.http.field.URIReferenceField Base class for HTTP header fields containing URI components
matlab.net.http.io.ContentConsumer Consumer for HTTP message payloads
matlab.net.http.io.FileConsumer Consumer for files in HTTP messages
matlab.net.http.io.StringConsumer String consumer for HTTP payloads
matlab.net.http.io.JSONConsumer Content consumer that converts JSON input into MATLAB data
matlab.net.http.io.ImageConsumer Consumer for image data in HTTP payloads
matlab.net.http.io.MultipartConsumer Helper for multipart content types in HTTP messages
matlab.net.http.io.BinaryConsumer Consumer for binary data in HTTP messages
matlab.net.http.io.GenericConsumer Consumer for multiple content types in HTTP messages
matlab.net.http.io.ContentProvider ContentProvider for HTTP message payloads
matlab.net.http.io.FileProvider ContentProvider to send files
matlab.net.http.io.FormProvider ContentProvider that sends form data
matlab.net.http.io.MultipartFormProvider ContentProvider to send multipart/form-data messages
matlab.net.http.io.StringProvider ContentProvider to send MATLAB strings
matlab.net.http.io.JSONProvider ContentProvider to send MATLAB data as JSON string
matlab.net.http.io.ImageProvider ContentProvider to send MATLAB image data
matlab.net.http.io.MultipartProvider ContentProvider to send multipart/mixed HTTP messages
matlab.net.http.io.GenericProvider Generic ContentProvider for HTTP payloads
matlab.net.http.AuthenticationScheme HTTP Authentication scheme
matlab.net.http.AuthInfo Authentication or authorization information in HTTP messages
matlab.net.http.Cookie HTTP cookie received from server
matlab.net.http.CookieInfo HTTP cookie information
matlab.net.http.Credentials Credentials for authenticating HTTP requests
matlab.net.http.Disposition Results in HTTP log record
matlab.net.http.HTTPException Exception thrown by HTTP services
matlab.net.http.HTTPOptions Options controlling HTTP message exchange
matlab.net.http.LogRecord HTTP history log record
matlab.net.http.MediaType Internet media type used in HTTP headers
matlab.net.http.ProgressMonitor Progress monitor for HTTP message exchange
matlab.net.URI Uniform resource identifier (URI)
matlab.net.ArrayFormat Convert arrays in HTTP queries
matlab.net.QueryParameter Parameter in query portion of uniform resource identifier (URI)
matlab.net.base64decode Base 64 decoding of string
matlab.net.base64encode Base 64 encoding of byte string or vector
WSDL (Web Services Description Language)
matlab.wsdl.createWSDLClient Create interface to SOAP-based web service
matlab.wsdl.setWSDLToolPath Location of WSDL tools
Toolbox Distribution
The rough equivalent of a MATLAB toolbox in Julia is a package.
matlab.addons.toolbox.packageToolbox Package toolbox project
matlab.addons.toolbox.toolboxVersion Query or modify version of toolbox
matlab.addons.toolbox.installToolbox Install toolbox file
matlab.addons.toolbox.uninstallToolbox Uninstall toolbox
matlab.addons.toolbox.installedToolboxes Return information about installed toolboxes
builddocsearchdb Build searchable documentation database
matlab.codetools.requiredFilesAndProducts List dependencies of MATLAB program files
Exception Handling
try, catch Execute statements and catch resulting errors
MException Capture error information
addCause Record additional causes of exception
getReport Get error message for exception
last Return last uncaught exception
rethrow Rethrow previously caught exception
throw Throw exception
throwAsCaller Throw exception as if occurs within calling function
Testing Frameworks
Script-Based Unit Tests
assert Throw error if condition false
runtests Run set of tests
testsuite Create suite of tests
TestResult Result of running test suite
Function-Based Unit Tests
functiontests Create array of tests from handles to local functions
runtests Run set of tests
testsuite Create suite of tests
TestSuite.run Run TestSuite array using TestRunner object configured for text output
Test Specification of a single test method
FunctionTestCase TestCase used for function-based tests
TestResult Result of running test suite
Class-Based Unit Tests
runtests Run set of tests
testsuite Create suite of tests
matlab.unittest.TestSuite.run Run TestSuite array using TestRunner object configured for text output
matlab.unittest.TestRunner.run Run all tests in TestSuite array
matlab.unittest.TestCase Superclass of all matlab.unittest test classes
matlab.unittest.TestSuite Class for grouping tests to run
matlab.unittest.Test Specification of a single test method
matlab.unittest.TestRunner Class for running tests in matlab.unittest framework
matlab.unittest.TestResult Result of running test suite
Extend Unit Testing Framework
matlab.unittest.constraints.Constraint Fundamental interface class for comparisons
matlab.unittest.constraints.BooleanConstraint Interface class for boolean combinations of constraints
matlab.unittest.constraints.Tolerance Abstract interface class for tolerances
matlab.unittest.fixtures.Fixture Interface class for test fixtures
matlab.unittest.diagnostics.Diagnostic Fundamental interface class for matlab.unittest diagnostics
matlab.unittest.diagnostics.ConstraintDiagnostic Diagnostic with fields common to most constraints
matlab.unittest.plugins.TestRunnerPlugin Plugin interface for extending TestRunner
matlab.unittest.plugins.QualifyingPlugin Interface for plugins that perform system-wide qualifications
matlab.unittest.plugins.OutputStream Interface that determines where to send text output
App Testing Framework
press Perform press gesture on UI component
choose Perform choose gesture on UI component
drag Perform drag gesture on UI component
type Type in UI component
matlab.uitest.unlock Unlock figure locked by app testing framework
matlab.uitest.TestCase.forInteractiveUse Create a TestCase object for interactive use
matlab.uitest.TestCase TestCase to write tests with app testing framework
Performance Testing Framework
runperf Run set of tests for performance measurement
testsuite Create suite of tests
matlab.perftest.TimeExperiment Interface for measuring execution time of code under test
matlab.perftest.FixedTimeExperiment TimeExperiment that collects fixed number of measurements
matlab.perftest.FrequentistTimeExperiment TimeExperiment that collects variable number of measurements
matlab.perftest.TestCase Superclass of matlab.perftest performance test classes
matlab.unittest.measurement.MeasurementResult Result of measuring test suite
Mocking Framework
matlab.mock.TestCase TestCase to write tests with mocking framework
matlab.mock.AnyArguments Match any number of arguments
matlab.mock.actions.AssignOutputs Define return values for method called or property accessed
matlab.mock.actions.ReturnStoredValue Return stored property value
matlab.mock.actions.StoreValue Store property value
matlab.mock.actions.ThrowException Throw exception when method is called or when property is set or accessed
matlab.mock.constraints.WasAccessed Constraint determining property get access
matlab.mock.constraints.WasCalled Constraint determining method call
matlab.mock.constraints.WasSet Constraint determining property set interaction
matlab.mock.MethodCallBehavior Specify mock object method behavior and qualify method calls
matlab.mock.PropertyBehavior Specify mock object property behavior and qualify interactions
matlab.mock.PropertyGetBehavior Specify mock property get behavior
matlab.mock.PropertySetBehavior Specify mock object set behavior
matlab.mock.TestCase.getMockHistory Return history from mock object
matlab.mock.InteractionHistory.forMock Return history from mock object
matlab.mock.InteractionHistory Interface for mock object interaction history
matlab.mock.history Summary of classes representing mock object interaction history
Performance and Memory
timeit Measure time required to run function
tic Start stopwatch timer
toc Read elapsed time from stopwatch
cputime Elapsed CPU time
profile Profile execution time for functions
bench MATLAB benchmark
memory Display memory information
inmem Names of functions, MEX-files, classes in memory
pack Consolidate workspace memory
memoize Add memoization semantics to function handle
MemoizedFunction Call memoized function and cache results
clearAllMemoizedCaches Clear caches for all MemoizedFunction objects
System Commands
clipboard Copy and paste text to and from system clipboard
computer Information about computer on which MATLAB is running
system Execute operating system command and return output
dos Execute DOS command and return output
unix Execute UNIX command and return output
getenv Environment variable
setenv Set environment variable
perl Call Perl script using operating system executable
winqueryreg Item from Windows registry
commandhistory Open Command History window, or select it if already open
commandwindow Open Command Window, or select it if already open
filebrowser Open Current Folder browser, or select it if already open
workspace Open Workspace browser to manage workspace
matlab.io.saveVariablesToScript Save workspace variables to MATLAB script
getpref Get custom preference value
setpref Set custom preference value
addpref Add custom preference
rmpref Remove custom preference
ispref Determine if custom preference exists
matlab.addons.installedAddons Get list of installed add-ons
matlab.addons.isAddonEnabled Determine if add-on is enabled
matlab.addons.enableAddon Enable installed add-on
matlab.addons.disableAddon Disable installed add-on
settings Access the SettingsGroup root object
Setting Setting object
SettingsGroup Group of settings and subgroup objects
clearTemporaryValue Clear the temporary value for a setting
clearPersonalValue Clear the personal value for a setting
hasTemporaryValue Determine whether the setting has a temporary value set
hasPersonalValue Determine whether the setting has a personal value set
hasFactoryValue Determine whether the setting has a factory value set
matlab.appdesigner App Designer settings, including canvas editor and component browser settings
matlab.editor Editor settings, including language, backup, and display settings
matlab.fonts Code font settings
matlab.general General settings including matfile settings
matlab.keyboard Keyboard settings including suggestions and completions settings
MATLAB API for Other Languages
MATLAB API for Java
matlab.engine.shareEngine Convert running MATLAB session to shared session
matlab.engine.engineName Return name of shared MATLAB session
matlab.engine.isEngineShared Determine if MATLAB session is shared
com.mathworks.engine.MatlabEngine Java class using MATLAB as a computational engine
com.mathworks.matlab.types.Complex Java class to pass complex data to and from MATLAB
com.mathworks.matlab.types.Struct Java class to pass MATLAB struct to and from MATLAB
com.mathworks.matlab.types.CellStr Java class to represent MATLAB cell array of char vectors
com.mathworks.matlab.types.HandleObject Java class to represent MATLAB handle objects
MATLAB API for Python
matlab.engine.start_matlab Start MATLAB Engine for Python
matlab.engine.find_matlab Find shared MATLAB sessions to connect to MATLAB Engine for Python
matlab.engine.connect_matlab Connect shared MATLAB session to MATLAB Engine for Python
matlab.engine.shareEngine Convert running MATLAB session to shared session
matlab.engine.engineName Return name of shared MATLAB session
matlab.engine.isEngineShared Determine if MATLAB session is shared
matlab.engine.MatlabEngine Python object using MATLAB as computational engine within Python session
matlab.engine.FutureResult Results of asynchronous call to MATLAB function stored in Python object
MATLAB API for C
MATLAB Engine API for C
mex Build MEX function from C/C++ or Fortran source code
C MEX File Applications
Executable C MEX Files
mex Build MEX function from C/C++ or Fortran source code
Share MEX Files
ver Version information for MathWorks products
computer Information about computer on which MATLAB is running
mexext Binary MEX file-name extension
mex.getCompilerConfigurations Get compiler configuration information for building MEX files
Troubleshoot MEX Files
dbmex Enable MEX-file debugging on UNIX platforms
inmem Names of functions, MEX-files, classes in memory
MATLAB API for Fortran
MATLAB Engine API for Fortran
mex Build MEX function from C/C++ or Fortran source code
MATLAB API for COM Automation Server
actxGetRunningServer Handle to running instance of Automation server
enableservice Enable, disable, or report status of MATLAB Automation server
Execute Execute MATLAB command in Automation server
Feval Evaluate MATLAB function in Automation server
GetCharArray Character array from Automation server
GetFullMatrix Matrix from Automation server workspace
GetVariable Data from variable in Automation server workspace
GetWorkspaceData Data from Automation server workspace
MaximizeCommandWindow Open Automation server window
MinimizeCommandWindow Minimize size of Automation server window
PutCharArray Store character array in Automation server
PutFullMatrix Matrix in Automation server workspace
PutWorkspaceData Data in Automation server workspace
Quit Terminate MATLAB Automation server
regmatlabserver Register current MATLAB as Automation server