Previous in Forum: Blocking Malware   Next in Forum: Docking in Windows
Close
Close
Close
7 comments
Rate Comments: Nested
Associate

Join Date: Oct 2010
Location: Denmark
Posts: 25

Mathcad Problem - Solving Equations with Multiple Values

10/11/2010 4:34 AM

Hi. Does anyone know how to solve equations with earlier calculated multiple values in? It will probably make a lot more sense if you take a look at the actual file. Not sure how to explain it otherwise. it should be a fairly easy problem. See the link: http://dl.dropbox.com/u/10626780/Problem.xmcd I have mathcad version 14. Thanks:)

__________________
Earth is the cradle of humanity, but one cannot remain in the cradle forever.
Register to Reply
Pathfinder Tags: Mathcad
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Guru
Technical Fields - Technical Writing - New Member Engineering Fields - Piping Design Engineering - New Member

Join Date: May 2009
Location: Richland, WA, USA
Posts: 21017
Good Answers: 795
#1

Re: Mathcad problem - solving equations with multiple values

10/11/2010 4:41 AM

I'm sorry, but that multicolored link certainly did not help.

__________________
In vino veritas; in cervisia carmen; in aqua E. coli.
Register to Reply
Associate

Join Date: Oct 2010
Location: Denmark
Posts: 25
#2
In reply to #1

Re: Mathcad problem - solving equations with multiple values

10/11/2010 4:51 AM

Its only the last line of calculations that gives me problems! sorry if its messy!

Multicolored?

__________________
Earth is the cradle of humanity, but one cannot remain in the cradle forever.
Register to Reply
Guru
Engineering Fields - Optical Engineering - Member Engineering Fields - Engineering Physics - Member Engineering Fields - Systems Engineering - Member

Join Date: Apr 2010
Location: Trantor
Posts: 5363
Good Answers: 647
#3

Re: Mathcad problem - solving equations with multiple values

10/11/2010 8:00 AM

I have an earlier version, MCAD 2000, which can't open the link. I'm not sure exactly what you mean, so I'll take a guess.

My thinking is that you want to set up a running variable with as many steps as you have previously-determined values and then create an array with these previously-determined values. The equations you want to solve would have to be written to accommodate arrays. For example:

Define the ORIGIN~1; then set i=:1,2...n where n is the the number of previously-determined values you have. Then create an array,

Xi =: 12 , 35 , 73 , 3.1416 , 137 (MCAD may show this as a column of data) Here there are five previously-determined values for X, so n=5.

You then define your equations to handle this data as an array.

Yi=: cos(Xi) - [(Xi-2)2 + sin(Xi)]3 + eXi

You will then get five values for Y.

Y=

-8.534 x 105

1.172 x 1016

5.052 x 1031

19.927

3.15 x 1059

__________________
Whiskey, women -- and astrophysics. Because sometimes a problem can't be solved with just whiskey and women.
Register to Reply
Associate

Join Date: Oct 2010
Location: Denmark
Posts: 25
#4
In reply to #3

Re: Mathcad problem - solving equations with multiple values

10/11/2010 8:29 AM

Thanks for your answer:) Your guess was pretty close:) even though the circumstances are a bit different. I have a column of data, which is the result of a previously calculation, thereby defined as x[n Then i have an equation: x[n = ( sqrt(a[n-1)*(4a[n-1) ) / sqrt(3a[n-1) Now i want to solve for "a" as a function of the the previously calculated values of x. I would like it to use the x[n instead of punching them in manually. Hope it is possible. I have tried to save the file as a Mcad 11 version, follow new link: http://dl.dropbox.com/u/10626780/Problem%20-%20mathcad%2011%20version.xmcd By the way, how do you change line/make spacings on the posts?

__________________
Earth is the cradle of humanity, but one cannot remain in the cradle forever.
Register to Reply
Guru
Engineering Fields - Optical Engineering - Member Engineering Fields - Engineering Physics - Member Engineering Fields - Systems Engineering - Member

Join Date: Apr 2010
Location: Trantor
Posts: 5363
Good Answers: 647
#5
In reply to #4

Re: Mathcad problem - solving equations with multiple values

10/11/2010 9:00 AM

Unless I'm missing something, that looks like simple algebra:

xn = sqrt(an-1*4an-1) / sqrt(3an-1)

can be rewritten as:

an-1= 3(xn2)/4

Since the left side is in n-1 and the right side is in n, you may need to add an extra term to your xn values; maybe just add an extra zero.

To answer your other question -- The message box you type into has a text editor across the top. Click and drag the cursor over the text you want to edit then click the appropriate tool button (bold, italics, underscore, slashthrough, embed hyperlinks and so forth...) To add a vertical space, hit the Enter bar on your keyboard.

__________________
Whiskey, women -- and astrophysics. Because sometimes a problem can't be solved with just whiskey and women.
Register to Reply
Associate

Join Date: Oct 2010
Location: Denmark
Posts: 25
#6
In reply to #3

Re: Mathcad problem - solving equations with multiple values

10/11/2010 9:24 AM

i think you've missed something, sorry

I have a column of data, which is the result of a previously calculation, thereby defined as x[n

Then i have an equation: x[n = ( sqrt(a[n-1)*(4a[n-1) ) / sqrt(3a[n-1)

Now i want to solve for "a" as a function of the the previously calculated values of x.

I would like it to use the x[n instead of punching them in manually.

(the "[n" after the parameters a and x, indicates that the it is a column of numbers)

Found out i couldn´t see the toolbar cause i was using Chrome!!! WTF?

__________________
Earth is the cradle of humanity, but one cannot remain in the cradle forever.
Register to Reply
Guru
Engineering Fields - Optical Engineering - Member Engineering Fields - Engineering Physics - Member Engineering Fields - Systems Engineering - Member

Join Date: Apr 2010
Location: Trantor
Posts: 5363
Good Answers: 647
#7
In reply to #6

Re: Mathcad problem - solving equations with multiple values

10/11/2010 9:51 AM

Yeah I must be missing something...

I 'solved' your equation for a and equated it to x. I.e., I gave you an equation in the form:

an-1 = f(xn)

Since your xn values are already determined, the equation I gave you should yield your values for a as a function of these x values. You'll get a column of values for a corresponding to your column of values for x.

A more general solution can be obtained using 'Solve Blocks'. They are a bit more complicated to explain and to use. I don't have the time now to get into those. If you need more help try the Mathcad collaboratory.

__________________
Whiskey, women -- and astrophysics. Because sometimes a problem can't be solved with just whiskey and women.
Register to Reply
Register to Reply 7 comments
Copy to Clipboard

Users who posted comments:

Juniper80 (3); Tornado (1); Usbport (3)

Previous in Forum: Blocking Malware   Next in Forum: Docking in Windows

Advertisement