Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Suppose I want to enable a worksheet user to enter an arbitrary list of values (i.e. worksheet does not know in advance how many values will be in the list, the list may or may not be sorted, and the interval between list entries may or may not be uniform), and subsequently pass the list as a variable to a function that creates an array from the list.
Is this possible without going outside Mathcad (i.e. could bring it in from a text file or Excel, but wondering if mathcad has any native support for list variables?)
Thanks in advance to all who respond.
Scott Milligan
Scott Milligan wrote:
Suppose I want to enable a worksheet user to enter an arbitrary list of values (i.e. worksheet does not know in advance how many values will be in the list, the list may or may not be sorted, and the interval between list entries may or may not be uniform), and subsequently pass the list as a variable to a function that creates an array from the list.
Is this possible without going outside Mathcad (i.e. could bring it in from a text file or Excel, but wondering if mathcad has any native support for list variables?)
Do you have a specific task in mind, Scott, in particular how big the lists might be or what forms they might take (eg, numbers, arrays) or how you might expect the users to enter such lists (eg, would you let them change a variable definition or want to protect the equations to some degree so users can't accidently mess the sheet up)?
Mathcad can import a number of file formats, including Excel and Matlab, and has components that allow direct interaction with them.
It is also possible to use a control (the Edit Box) to input data, which can then be either partially or completely processed within the component using VBScript or passed to Mathcad to parse.
Mathcad has a data table component (like a spreadsheet) and you can build vectors using the stack & augment functions.
Stuart
I would say yes but a little more information would be required. Maybe a worksheet explaining exactly what your trying to achieve.
Mike