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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Variable's value change in worksheet

trama
1-Visitor

Variable's value change in worksheet

Hello, new at using Mathlab 14, I have a problem with unwanted variable's value change based on it's location on the worksheet. In the attached file, variable's K33,5 value changes by moving it above/below worksheet's first horizontal line and I cannot understand why. Help needed.

ACCEPTED SOLUTION

Accepted Solutions
LucMeekes
23-Emerald III
(To:trama)

You're experiencing numerical inaccuracy.

The initial definition of K3 is:

After redefinition is changes to:

So e.g. K3[0,0 changes from:

to

while none of the parameters (E, I, A, a) are zero.

This means that K3[0,0 changes from E*A/a to E*A/a+12*0 unchanged.

K3[1,0 changes from 0 to

which is 0, because there's a sin(180 deg)=0 in both parts, But when you evaluate it numerically, you get:

Which is a number very small compared to 186*10^6.

They are 10^6/10^-9=10^17 apart, which is about the numerical accuracy of Mathcad.

Luc

View solution in original post

4 REPLIES 4
LucMeekes
23-Emerald III
(To:trama)

No magic, just Mathcad (not Matlab).

That is because just above the 'first horizontal  line, at the far left, you redefine K3 to be the old K3 multiplied with T3 and its transpose.

Success!

Luc

trama
1-Visitor
(To:LucMeekes)

Thank you for your answer, the problem is, that the new K3 is supposed to be identical to the old one with a few changes in (+/-), yet if i check K3(1,0) which is suppose to be 0, it has a different value. Am I missing something here ? Sorry for the trouble.

LucMeekes
23-Emerald III
(To:trama)

You're experiencing numerical inaccuracy.

The initial definition of K3 is:

After redefinition is changes to:

So e.g. K3[0,0 changes from:

to

while none of the parameters (E, I, A, a) are zero.

This means that K3[0,0 changes from E*A/a to E*A/a+12*0 unchanged.

K3[1,0 changes from 0 to

which is 0, because there's a sin(180 deg)=0 in both parts, But when you evaluate it numerically, you get:

Which is a number very small compared to 186*10^6.

They are 10^6/10^-9=10^17 apart, which is about the numerical accuracy of Mathcad.

Luc

trama
1-Visitor
(To:LucMeekes)

Thank you for your time
T. R

Announcements

Top Tags