11-28-2012 12:03 AM
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.
Solved! Go to Solution.
11-28-2012 05:13 PM
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);
11-28-2012 09:39 PM
Thank you.