Skip to Main Content Skip to Search
Product Documentation

MLDeleteMatrix - Delete MATLAB matrix

Syntax

MLDeleteMatrix(var_name)
MLDeleteMatrix var_name
out = MLDeleteMatrix(var_name)

Description

MLDeleteMatrix(var_name) deletes the named matrix from the MATLAB workspace. Use this syntax when working directly in a worksheet.

MLDeleteMatrix var_name deletes the named matrix from the MATLAB workspace. Use this syntax in a VBA macro.

out = MLDeleteMatrix(var_name) lets you catch errors when executing MLDeleteMatrix in a VBA macro. If MLDeleteMatrix fails, then out is a string containing error code. Otherwise, out is 0.

Input Arguments

var_name

Name of MATLAB matrix to delete.

var_name in quotes directly specifies the matrix name. var_name without quotes specifies a worksheet cell address (or range name) that contains the matrix name.

Output Arguments

out

0 if the command succeeded. Otherwise, a string containing error code.

Examples

Delete a Matrix from the MATLAB Workspace

Delete matrix A from the MATLAB workspace:

MLDeleteMatrix("A")

See Also

MLAppendMatrix | MLGetMatrix | MLPutMatrix

  


Recommended Products

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

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