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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

defining a variable

jreddy
1-Newbie

defining a variable

hello im solving the equation at the end .But i dont want that unknown variable to be marked in red colour how to solve this problem.

1 ACCEPTED SOLUTION

Accepted Solutions

Or you could just define as T_2_10k like in the attached.

View solution in original post

36 REPLIES 36
MikeArmstrong
5-Regular Member
(To:jreddy)

You could make make the formulas dependant on the unknown parameters functions.

Please provide a worksheet if you are unsure.

Sure mike it will be very helpfull

MikeArmstrong
5-Regular Member
(To:jreddy)

Is there a reason you are solving this symbolically?

Yes,others should be able to understand this calculation........you can solve it such that it is understandable

MikeArmstrong
5-Regular Member
(To:jreddy)

How about the attached?

Or you could just define as T_2_10k like in the attached.

Clever approach!

Do you have an explanation why the symbolic fail if we assign T_2_10k any other dummy value than 1 ft lbf (1 J works, too)?

Of course we can put T_2_10k:=T_2_10k before the symbolic solve.

MikeArmstrong
5-Regular Member
(To:Werner_E)

Werner Exinger wrote:

Clever approach!

Do you have an explanation why the symbolic fail if we assign T_2_10k any other dummy value than 1 ft lbf (1 J works, too)?

Of course we can put T_2_10k:=T_2_10k before the symbolic solve.

No idea at all. It does work for for 1*J too.

Mike Armstrong wrote:

Werner Exinger wrote:

Clever approach!

Do you have an explanation why the symbolic fail if we assign T_2_10k any other dummy value than 1 ft lbf (1 J works, too)?

Of course we can put T_2_10k:=T_2_10k before the symbolic solve.

No idea at all. It does work for for 1*J too.

Yes, it seems to be the "1" which does the trick but its quite puzzling.

Thanks mike it will work.....

MikeArmstrong
5-Regular Member
(To:jreddy)

You are welcome

im trying this logic but im getting an error is there any logic to give that T_2_10k=1ftlbf

MikeArmstrong
5-Regular Member
(To:jreddy)

jagadeesh reddy wrote:

im trying this logic but im getting an error is there any logic to give that T_2_10k=1ftlbf

No!!! The symbolic processor doesn't like any other values except 1 - I am not sure why though. This was simply a workaround and not a solution.

how did you get it im not able to get it.

MikeArmstrong
5-Regular Member
(To:jreddy)

See below and attached.

Clipboard01.jpg

Capture.PNG

Im trying the same im getting this error

Werner_E
24-Ruby V
(To:jreddy)

If the equations you show are just for reference and are not meant of defining variables, you can use the boolean equal sign instead of the assignment :=. That way you would use Mathcad as a simple equation editor.

Werner_E
24-Ruby V
(To:jreddy)

Here is another approach using a solve block to solve for all six unknowns simultaneously. The benefit is, that after the calculation of T_2_10k we do not need to call function or redefine variables a second time to get the other variables like tau_2_10k or sigma1_2_10k.

MikeArmstrong
5-Regular Member
(To:Werner_E)

Werner Exinger wrote:

Here is another approach using a solve block to solve for all six unknowns simultaneously. The benefit is, that after the calculation of T_2_10k we do not need to call function or redefine variables a second time to get the other variables like tau_2_10k or sigma1_2_10k.

Certainly the most elegant way

Werner Exinger wrote:

Here is another approach using a solve block to solve for all six unknowns simultaneously. The benefit is, that after the calculation of T_2_10k we do not need to call function or redefine variables a second time to get the other variables like tau_2_10k or sigma1_2_10k.

Thanks i guess this is a better solution

MikeArmstrong
5-Regular Member
(To:jreddy)

It is a better solution but somethimes hard to follow.

yes..... im using your idea but there will be a small confusion with that dummy value T_2_10k:=1ftlbf for starters.Is it mentioned any where in mathcad tutorials or in help section.

MikeArmstrong
5-Regular Member
(To:jreddy)

I very much doubt it. I have no idea why it works but it does

What is your confusion?

its only working in the worksheet you sent when i try it in my new worksheet its taking the T_2_10k:=1ftlbf...is there any logic to give that

Werner_E
24-Ruby V
(To:jreddy)

jagadeesh reddy wrote:

its only working in the worksheet you sent when i try it in my new worksheet its taking the T_2_10k:=1ftlbf...is there any logic to give that

Not sure what you mean by "its taking the T_2_10k:=1ftlbf..."???

If it doesn't work it may mean that you have changed other things in your new worksheet.

Mike assigned just a dummy value to T210k to avoid the red errors. Normally the symbolics would refuse to solve for T210k now because its not an unknown anymore. Its unclear why it works when Mike assignes 1ftlbf and it will fail for other values.

I already wrote above what you should do. Simply write T210k:=T210k before the region with the symbolic solve. That way you can assign any dummy value as this procedure makes that value invisible for the symbolc processor.

EDIT: Now I got an idea what you could have meant. Do you think that T210k gets a new value after the solve statement? Thats not the case unless you redefine T210k by T210k:=------ solve,T210k --->

Similar applies to your aother variables. You need to redifene them all for the new value of T210k to take effect. That was the reason I posted my approach as your problem basically IS a system of six equations in six variables.

MikeArmstrong
5-Regular Member
(To:Werner_E)

But if he wants a symbolic solution there is no need to define T210K at all.

I don't think that he wants a symbolic solution - otherwise he would not have assigned values to the other variables at all. I guess he wants values but didn't know how to get them and so tried the symbolics. The assignments he did are now just abbrevations and would have to be retyped after the solving for T210k - rather inefficient and failure prone.

If the solve block approach is not desired for one reason, then sticking to the function approach as in your first reply would be the better option.

After all the main reason for the question seems to have been how to get rid of the red error the numeric is throwing.

jagadeesh reddy will know what he needs and I fear that he is surprised that his variable T210k after he solved for it still has the value 1 ft.lbf.

werner,

you are right it is taking the value to be 1 ft.lbf.and giving different result.I think there is some logic in assigning that variable i am typing T_2_10k:1 ft.lbf is there any other method to assign it

Werner_E
24-Ruby V
(To:jreddy)

jagadeesh reddy wrote:

werner,

you are right it is taking the value to be 1 ft.lbf.and giving different result.I think there is some logic in assigning that variable i am typing T_2_10k:1 ft.lbf is there any other method to assign it

Sorry, I don't understand your question and i am not sure which problem you experience.

Top Tags