Home > database > enum2data.m

enum2data

PURPOSE ^

Converts Ensemble enum values to numeric values.

SYNOPSIS ^

function data=enum2data(enum)

DESCRIPTION ^

 Converts Ensemble enum values to numeric values.

 data=enum2data(enum);

 Any values that were left empty (0) are filled with NaN.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function data=enum2data(enum)
0002 % Converts Ensemble enum values to numeric values.
0003 %
0004 % data=enum2data(enum);
0005 %
0006 % Any values that were left empty (0) are filled with NaN.
0007 
0008 % 07/30/06 Petr Janata
0009 
0010 % Convert the enum values into scale values.
0011 % Suppress log of zero errors in the process
0012 
0013 warning off
0014 data = log2(enum)+1;
0015 warning on
0016 
0017 data(isinf(data)) = NaN;
0018 
0019 return

Generated on Wed 20-Mar-2019 04:00:51 by m2html © 2003