LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

mathscript NaN initialize array LV 8.6

Solved!
Go to solution

For those of us who purchased LV 8.2-8.6 Mac OS Dev Suite, the mathscript module will not initialize an array with NaN.

That is,

c=nan(m,n)

and

repmat(NaN,m,n)

are broken.

 

The only work around I can find is to replace a number, such as "0":

 

InT=repmat(0,m,n); InT(:)=NaN;

 

Would appreciate any other work-arounds to create a m x n array of NaN.

0 Kudos
Message 1 of 3
(2,085 Views)
Solution
Accepted by topic author wjdwyer

Hi wjdwyer,

 

This has been fixed in newer versions of MathScript, but for the older versions another potential workaround that I've come across is to multiply nan by an array that already exists (see below). I know this isn't ideal, but hopefully it will at least give you an alternative.

 

A = nan * repmat(1,m,n);

Message 2 of 3
(2,062 Views)
Solution
Accepted by topic author wjdwyer

Thank you.

0 Kudos
Message 3 of 3
(2,052 Views)