Skip to main content
1-Visitor
April 13, 2011
Question

Variable in Decleration

  • April 13, 2011
  • 3 replies
  • 3559 views

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

3 replies

12-Amethyst
April 13, 2011

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.

1-Visitor
April 13, 2011

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

23-Emerald I
April 13, 2011

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.

1-Visitor
April 13, 2011

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

1-Visitor
April 13, 2011

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.

1-Visitor
April 13, 2011

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