HP Forums

Full Version: INPUT() allowed types matrix
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I would like to use ONLY input TYPE(0), Real, or TYPE(4), vector:
This INPUT() [allowed types matrix], for vector v, doesn't work:


  INPUT ({ {v, [0,4], {25,70,1}},              
                {w, [4], {25,70,2}} }, 
                "Vector Projection", 
                {"Vector_v ", "Vector_w "}, 
                {"Input Vector v = [x,y,z], or Angle θ", "Input Vector w = [x,y,z]"},           
                {} );

It does accept the v = Real, TYPE(0), but does not accept the v = [x,y,z], TYPE(4), in the allowable types matrix. What to do?

For now only one type is allowed at a time, [0], [2], [8], etc.
I think it is actually the "0" or real number part that is messing things up here. Having 0 in the list superceeds everything else which it probably shouldn't. For example [2,4] works as expected.

This is probably due to having some special handling internally for real numbers originally that probably is messing it up. Not sure though.
I tried both ways, [0,4], and [4,0], so if having TYPE(0) anywhere in the list is overriding everything else that probably does explain things.

Would it also have something to do with allowable type matrix containing [-1], (all types allowable)? In this case, it returns a string, TYPE(8), when a vector, TYPE(4) is provided as the input.
Reference URL's