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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Variable in Decleration

MikeArmstrong
5-Regular Member

Variable in Decleration

This thread was created by a guest, but was created as a document so I have re-created it as a discussion to allow fellow collabs to contribute.

QUESTION


I am curious if there is a way to have a variable in a declaration. See the attached file for the example

My answer has been incorporated into the original worksheet, which shows the answer.

Mike

6 REPLIES 6

Mike, thanks for taking the time.

One suggestion, use a program, see attached. Not exaclty what is asked for, but I think might be OK.

MikeArmstrong
5-Regular Member
(To:wayne)

That is a good suggestion. I was a little concerned about posting the solution in my sheet as I knew is wasn't entirely correct, but it was the answer to the original question.

Have a look at the attached. A slightly different approach.

Cheers

Mike

QUESTION


I am curious if there is a way to have a variable in a declaration. See the attached file for the example

When you definea variable with two subscripts you have created an array. In this case Table[1,5 creates an array two rows by six columns and inserts a 2 x 2 array in the last spot. Matncad fills the rest of the array with zeros.

When you definea variable with two subscripts you have created an array. In this case Table[1,5 creates an array two rows by six columns and inserts a 2 x 2 array in the last spot. Matncad fills the rest of the array with zeros.

Cheers for the response Fred.

I know that when a variable is defined with two subscripts a Matrix is created. The solution I posted was not the best, but was an answer to the original question.

As long as Table was evaluated using two subscripts there wouldn't have been an issue.

Mike

Thank you all very much for your assistance. I suppose as I originally asked this as a "guest" there is no way for me to hand out stars now....The information provided is very helpful and I *think* i can make my sheet work now.


Thank you.

MikeArmstrong
5-Regular Member
(To:EdNystrom)

Thank you all very much for your assistance. I suppose as I originally asked this as a "guest" there is no way for me to hand out stars now....The information provided is very helpful and I *think* i can make my sheet work now.

Firstly welcome to the forum.

Do not worry about handing out stars the main thing is that you got your answer.

Mike

Top Tags