Post Reply 
INPUT() allowed types matrix
08-14-2018, 11:01 AM
Post: #1
INPUT() allowed types matrix
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:

Code:

  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]"},           
                {v,w}, 
                {} );

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?

-Dale-
Find all posts by this user
Quote this message in a reply
08-14-2018, 11:27 AM
Post: #2
RE: INPUT() allowed types matrix
For now only one type is allowed at a time, [0], [2], [8], etc.

Viga C | TD | FB
Visit this user's website Find all posts by this user
Quote this message in a reply
08-14-2018, 01:12 PM (This post was last modified: 08-14-2018 01:23 PM by Tim Wessman.)
Post: #3
RE: INPUT() allowed types matrix
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.

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
08-14-2018, 01:26 PM
Post: #4
RE: INPUT() allowed types matrix
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.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)