Special names and values used in JSONlab

Constant values

"_NaN_"
this string value is used to represent an array element that has NaN value in MATLAB;
"-_Inf_"
this string value is used to represent an array element that has -Inf value;
"_Inf_"
this string value is used to represent an array element that has Inf value;
true
this value is used to represent a logical 1 when 'opt.ParseLogical' is set to 1;
false
this value is used to represent a logical 0 when 'opt.ParseLogical' is set to 1;
null
this value is used to represent an empty array, i.e. [].

Array constructs

"_ArrayType_"
this string name is used to record the class name of an array object, the value is the output "class(obj)";
"_ArraySize_"
this string name is used to record the class name of an array object, its value is the output of "size(obj)";
"_ArrayIsSparse_"
this string name is set to 1 if an object is a sparse array, 0 if not;
"_ArrayIsComplex_"
this string name is set to 1 if an object is a complex array, 0 if not;
"_ArrayData_"
this string name is used to record the data values in an array object; it may have the following format:
full real array
the value of "_ArrayData_" is a row or column vector recording the 1D representation of an array, i.e. obj(:)
full complex array
the value of "_ArrayData_" is a 2-column array recording the real and imaginary of the 1D representation of an array, i.e. [real(obj(:)) imag(obj(:))
sparse real array
the value of "_ArrayData_" is a 3-column array in the format [ix,iy,full(obj(find(obj)))] where ix and iy are the row/column indices of non-zero entries;
sparse complex array
the value of "_ArrayData_" is a 4-column array in the format [ix,iy,real(full(obj(find(obj)))),imag(full(obj(find(obj))))] where ix and iy are the row/column indices of non-zero entries;
Powered by Habitat