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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Create a vector of placeholders w/o using 'Insert Matrix'

KevinWadley
1-Newbie

Create a vector of placeholders w/o using 'Insert Matrix'

I would like to generate a vector of placeholders the size of which would depend on a particular variable's value in my worksheet. For example, if my variable's value is 4, then my vector would have 4 inputs. If my varialbe's value was 5, then my vector would have 5 inputs, etc. Suggestions or ways to do this w/o vectors? TIA
1 REPLY 1

I would usually suggest the use of an input table, where the number of rows is set by whatever the user enters. If the variable for the number of elements is just a user input, specifying the dimensions of the problem, I would eliminate it completely and just look at the number of rows actually entered. If the value was determined by other considerations I would just have a check for the proper number of rows somewhere after the table. As an alternative in MC14 it should be possible to create a component that creates an array constructor with the desired number of entries. See my define variables sheet over in the collaboratory for something similar.
Top Tags