×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Importing of equations to Mathcad from text file

Importing of equations to Mathcad from text file

Importing of equations to Mathcad from text file

(OP)
Hi,

I have the following problem.
I have a system with about 10K of equations in the form:
x1x2+5x2x3-10x3x10-...-6x985x545=15

It's stored in text file. How to import it to Mathcad so that all indexes would become real Mathcad indexes so that I would be able to ask Mathcad to find the solution of such equations system? I'm trying simple copy-paste but it inserts it as separate fields and doesn't want to calculate it. When I tried to do some kind of import, it imports tables... whatever except what I want. Would really appreciate your help.

Thanks,
Oleg

RE: Importing of equations to Mathcad from text file

If you have Mathcad 14, you might be able to convert the text into XML, and insert it directly into the file.  However, this is a non-trivial exercise.

TTFN

FAQ731-376: Eng-Tips.com Forum Policies

RE: Importing of equations to Mathcad from text file

(OP)
Hi,

Great thanks for suggestion. I have Mathcad 14. I looked into XML generated by Mathcad for simple system of equations and the result didn't make me too happy :-) i'm not expert in XML (i'm specialist in embedded SW, not databases or XML stuff) so it wasn't easy to read. It's not trivial, but possible solution; are there any other thoughts on this?

Thanks,
Oleg

RE: Importing of equations to Mathcad from text file

Can you explain your problem a bit better, I think you are asking for the simultaneous solution of 10000 equations of the form sigma a(i)*x(j)*x(k) ofr various different i j and k in each case.

I'm not entirely sure that is solvable by Mathcad.

 

Cheers

Greg Locock


New here? Try reading these, they might help FAQ731-376: Eng-Tips.com Forum Policies  http://eng-tips.com/market.cfm?

RE: Importing of equations to Mathcad from text file

(OP)
Hi Greg,

Your understanding is right. In fact, 1/2 of equations have the form you mentioned, other part has a form sigma a(i)*x(j), and totally, to be precise, there would be 6.5K equations.

I tried to enter manually about 20 equations and Mathcad solved them pretty quickly. I don't think such computation would be too complex for him. Anyway, we wouldn't know that until importing the equations to Mathcad. And now i'm searching the best way to import them.

Thanks,
Oleg

RE: Importing of equations to Mathcad from text file

Have look at the following thread in the PTC User Forum (not Collab):

http://www.ptc.com/forums/viewtopic.php?t=7095

Viacheslav Mezentsev has presented a 'text formula' converter that may be able to help you.

RE: Importing of equations to Mathcad from text file

(OP)
Hi Excognito.

I looked into it but can't understand how to use it. After its hidden sources there are some examples, but I can't understand what the stuff under "text" in yellow is producing.

Thanks,
Oleg

RE: Importing of equations to Mathcad from text file

(OP)
Hi All,

Any other ideas/thoughts/suggestions?

Thanks,
Oleg

RE: Importing of equations to Mathcad from text file

If you do a <CTRL>-F9 on the sheet in question, you can see that it evaluates the expressions within quotation marks in the function.

However, that is not what you appearing to asking for, since the Calc interpreter is actually doing the math, and not actually entering equations into Mathcad.

The previous suggestion of running a parser to generate the XML code for Mathcad is probably the cleanest way.

Alternately, a brute force approach is to use something like the SENDKEYS function in Visual Basic to take the text equations and send the equivalent keystrokes into the Mathcad user interface.

TTFN

FAQ731-376: Eng-Tips.com Forum Policies

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login



News


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close