Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Find" function outputs fractions

Status
Not open for further replies.

siscogj

New member
May 30, 2008
10
how do I output in decimal form?

Thanks!
 
Replies continue below

Recommended for you

Adding the "Float" keyword might do it. You should post your sheet next time.

TTFN

FAQ731-376
 
First, it appears that you're trying to do a numerical problem, but you are using the symbolic <CTRL>+. evaluation on the Find.

Second, for numerical problems, you need to provide guess values for ALL of the unknowns.

Third, M14 does not like mixed units in the solution, and you'll have to normalize the units in the Find, and add them back later. It's a PITA, but that's the way it is.

See attached:
TTFN

FAQ731-376
 
-It is odd that you see so many flaws in the program because when I copy-and-paste the ridiculously long fraction outputs into Matlab and solve they are very realistic values for my application...except they output as ridic fractions. I'm certainly not discarding your comments because you are probably correct, as I am very new with Mathcad.

-I actually followed a Mathcad "solve block" or "find" help example which indicated that the way I setup this program(using <CTRL> + . arrow) does NOT require ANY guess values for the 5 unknowns. Of course I cannot not find the document now to show you....

-When you say "normalize the units", do you mean simply delete them all and add in after I get the solution? Again, Mathcad seems to be solving thru with proper units....

-I think you MAY be misinterpretting how I setup the problem. Yes, I did assign numerical values to a slew of variables that act as constants in the 5 eqns, but the 5 unknowns have no numerical assignments, thus I think using symb = is ok based on my reading thru MathCad help, etc....I also tried running this with regular = and is would not even solve...

MAthCad Help(Symbolic Equal Sign) says:
"Example:
To evaluate the expression x2·x3 + 5x + 3x ? 6 + 4, type the expression and then:

Press [Ctrl] [.] to insert the symbolic equal sign after the expression, or click ? on the Symbolic toolbar.
x2·x3 + 5x + 3x ? 6 + 4 ?

Click outside the expression or press [Enter]. The result appears to the right of the arrow.
x2·x3 + 5x + 3x ? 6 + 4 ? x5 + 8x ? 2

Mathcad simplifies the expression by performing arithmetic and combining like terms. Note that you cannot evaluate this expression using the numerical equal sign, because the variable x does not have an assigned value. To evaluate it, you must use the symbolic equal sign.

To perform more complicated symbolic operations such as factoring or expanding an expression, you can insert a keyword before the symbolic equal sign."



Thanks again for your time. Any feedback is appreciated.

-Greg
 
I just placed "float,2" from the Symbolic toolbar right after the arrow head and it is giving me decimal soln.

I definitely am interested to figure out if my program is FUBAR.

Any feedback is certainly valued.

Thanks
 
> The symbolic solver DOES NOT DO UNITS. It treats them as unknown variables. This means that any dimensional errors will be ignored.


TTFN

FAQ731-376
 
OK.
I deleted all units and it still solves with same numerical outputs, except now there are no units.

Do you still believe my use of the "find" function with symbolic = and no initial guess is errant?
 
No, just that it's not the normal tool to use. Mathcad's strength is its units handling capabilities, which is not handled by the symbolic processor.

To go without units is dangerous and unnecessary, particularly since you are not actually solving a symbolic problem, you're doing a numeric problem.

You're after a numeric solution, and there appears to be no desire to see the actual algebraic solution, so why use the symbolic processor that doesn't do units?

TTFN

FAQ731-376
 
In the attachment I got rid of all symbolic + and inserted inital guesses for thr 6 unknowns above the "Given" section. I also attempted to normalize all the six variables in the Find function.

Any idea what is causing the "a name is required error message and the cause of left side of four equations turning red?

thanks!
 
 http://files.engineering.com/getfile.aspx?folder=afbb91ea-9599-443a-be03-eeeb481f1028&file=12bMAY2010.xmcd
You appear to be using assignment operators ( := ) instead of constraints ( <CTRL>+= ), which is what you had in your first sheet.

A solve block is supposed to find the solution to a set of constraints.

TTFN

FAQ731-376
 
OK, I switched back to the <CTRL>+= and it is solving with no units on output vector, due to the way I normalized the find function.

Is this what you meant when you mentioned normalizing the find function ?
 
Yes. The particular solution you're asking for is a vector of variables. M14 does not allow mixed units in a vector.

TTFN

FAQ731-376
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor