I have some trouble in data inputing and outputing to a function in Mathcad programming. Is it ok to use matrix as input and output arguments? Is there any way to define some "global" vairable or matrix in Mathcad? Thanks!
Yes, you can use any variable to get data into (and out of) a Mathcad program function. The only downside is that Mathcad doesn't like mixed units in an array or matrix.
All variables outside the "program" are available inside the protgram; but variables inside the program are local to the program. A common trick for getting multiple results out of a program function is to just stack them all together in a single array (use augment() or similar functions) and pass that array out as the result of the function.