Skip to Main Content Skip to Search
Product Documentation

MLMissingDataAsNaN - Set empty cells to NaN or 0

Syntax

MLMissingDataAsNaN(flag)
MLMissingDataAsNaN flag
out = MLMissingDataAsNaN(flag)

Description

MLMissingDataAsNaN(flag) sets empty cells to NaN or 0. When the Spreadsheet Link EX software is installed, the default is "no", so empty cells are handled as 0s. If you change the value of MLUseCellArray to "yes", the change remains in effect the next time a Microsoft Excel session starts. Use this syntax when working directly in a worksheet.

MLMissingDataAsNaN flag sets empty cells to NaN or 0. Use this syntax in a VBA macro.

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

Tips

Input Arguments

flag

Either "yes" or "no".

Specify "yes" to set empty cells to use NaNs. Specify "no" to set empty cells to use 0s.

Default: "no"

Output Arguments

out

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

Examples

Set Empty Cells to Use 0s

Cancel the use of the value NaN for empty cells:

MLMissingDataAsNaN("no")

See Also

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