Question: Converting "Undefined" Elements of Array

I am having difficulty with a procedure that takes an Array and returns its maximum element -- and suspect that the difficulty is due to the fact that my Array (called it A) has elements of mixed data type, i.e. some numeric and some "undefined" elements. How do I replace the undefined elements and/or get Maple to work with them?

I was thinking that I could convert them to a placeholder value of 0, since I'm maximizing?

Here's the error message, followed by a slice of my array -- you can see that there's already an undefined elements:

Error, (in maxpt) invalid input: ArrayDims expects its 1st argument, A, to be of type Array, but received [[.2500000000, .3125000000, .3620558262, .4031851184, .4375000000, .4659321892, .4891103366, .5074959503, .5214466094, undefined, .5368923611, .5381944444, .5351562500, .5277777777, .5160590278, .5000000000, .5000000000, .5000000000, .5000000000, .5000000000, .5000000000, .5000000000, .5000000000, .5000000000, .5000000000], [.2947082519, .3533020019, .3989515781, .4361746204, .4665832520, .4911091912, .5103810885, .5248604523, .5349048614, .5406428808, .5417911264, .5383316213,

Thanks!


Please Wait...