cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Possible to create arrays from user supplied list values?

ScottMilligan
3-Visitor

Possible to create arrays from user supplied list values?

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

2 REPLIES 2

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

http://communities.ptc.com/servlet/JiveServlet/showImage/2-149416-2532/bar_anim.gif

Top Tags