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

Community email notifications are disrupted. While we are working to resolve, please check on your favorite boards regularly to keep up with your conversations and new topics.

Excel Component - Nested Array

ptc-1468895
1-Newbie

Excel Component - Nested Array

Attached is a small portion of a very large calculation file.

The problem is the output values of a formula that is using two variables from the table.

The output is not providing the values but is giving a value of [11,1] in each cell.

We have used an excel table to input data in a range variable that was not uniform.

The two variables from the table are di and Zvi
Your help is appreciated.
10 REPLIES 10

>When this is multiplied by Zvi(di) why does it produce the matrix output values as [11,1]<<br> ___________________________

You are assigning to compute elements by elements. It looks quite alright from inspection. Your Excel component is a foolish item in the work sheet, can't even copy the data ! Instead, make an input table. Unest the stack and get an array of solutions.

jmG

Thanks Jim, however, I am not used to working with tables. Typically my values are easily defined in a range variable for di and Zvi is a constant.

Do you have an example of working with a table?

>Do you have an example of working with a table ?<<br> ___________________________

Disable the Excel table, the "data" is all geared for same task. Your unit system does not work in 11, but should back on Richard commented work sheet.

jmG

Thank you. I like the table better.

another question

In the function for AreqgLRFD how do I pass the vectors into this program to have it slove for all values in di?
RichardJ
19-Tanzanite
(To:ptc-1468895)

You need to change the way you are using vectorization.

Unless you are doing it for the display, the Excel component seems like a hard way to do some simple calculations.

Richard

Your problem has nothing to do with Excel or components, it's just the way you misuse vectors.

There is a bit of an oddity about the Excel component. You carefully pass a couple of values as parameters, but you also have a number of hard coded constants. I suspect that changing the input parameters will just result in inconsistent results.

Your real problem is a failure to keep track of what is a scalar (or an element of a vector) and what is a vector. In your definitions of AreqgLRFD and Tmax_Test the argument di (with the i a confusing literal subscript) is a scalar (passed that way because of the vectorization of the calls to these function), but Zvi is a vector (not an element of a vector). The result of the multiplication is therefor a vector. So when you invoke these functions for each element of the vector di (a worksheet vector valued variable, distinct from the scalar argument di) you get a vector of vector results.
__________________
� � � � Tom Gutman

Thanks Tom. I agree with your observations. I have worked through it by using a data table.

How does a data table help? A data table is quite irrelevant to your sheet. An input table is just for typing in data values. But most of your values in the Excel sheet are computed, not typed. Typing them into a data table is a step backwards. You could do the calculations in Mathcad. But the irregularities in the calculations (assuming they are correct) are easier to deal with in Excel, where you have replicated formulae that can be varied or changed for the exceptions.

And your problem is well after the input, when you already have the vectors of data. How you get those vectors makes no difference to your problem.
__________________
� � � � Tom Gutman

Thanks for your help Tom. I took the data table out completely.

On 8/17/2009 6:55:06 PM, tptaylor wrote:
...
>I have worked through it by using a data table.<<br> ___________________________

I have removed your Excel and your programme, removed intentionally so for you to work out the engineering formulation that you are the only one understanding something about. Mathcad 14 and 11 are incompatible unit wise, check that also. The vectorize operator is an element by element operator, construct your formulas accordingly.

jmG
Top Tags