Previous in Forum: Software Operation   Next in Forum: Programming With MPI
Close
Close
Close
2 comments
Rate Comments: Nested
Participant

Join Date: Oct 2010
Posts: 2

MathCad Loop Problem - Returning All Values

10/29/2010 9:26 AM

Hello, im new to mathcad and want to create a loop within a loop that will return a value for every calculation. I have done everything i guess.. but my loop isnt returning a proper value.. and keeps giving me errors.. i want to plot E.j over a graph so I want every individual value calculated.

ive attached the mathcad file.. can you please look at it and tell me where im going wrong.

i first used the built in summation but taht was giving some problems and was not returning any value for me.. (its the loop on the right) i then made a manual program to sum every calculate value.. it works but just gives me the final value..

I want it to output a value for ever idiv.

Thank you

http://hotfile.com/dl/79118434/2f8ceb9/2.xmcd.html

Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

"Almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, vote them!
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
#1

Re: MathCad Loop Problem - Returning All Values

10/29/2010 11:10 AM

I've used Mathcad 2000 for years. I wasn't able to download your file, but here are some suggestions that might work.

1. Run the loop, or nested loop, with simple algebra statements first to verify your loop is defined properly. Use algebra statements for which you know, or can easily determine, the answer for each run through the loop.

2. Use a WRITEPRN(file):=A or APPENDPRN(file):=A statement within the loop. This will create a file you can access as a text file using MS Notepad or MS Wordpad to see if the expected values are being generated. Each trip through the loop should add a value to the text file.

3. Once you've done steps 1 and 2, rewrite the loop with the equations you want Mathcad to solve, and see if you get a realistic result.

4. If this doesn't work, visit the Mathcad Collaboratory with your problem. Someone there running the same version of Mathcad as yours can examine your workfile and help you directly.

Good luck.

__________________
Whiskey, women -- and astrophysics. Because sometimes a problem can't be solved with just whiskey and women.
Register to Reply Score 1 for Good Answer
Participant

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

Re: MathCad Loop Problem - Returning All Values

11/01/2010 3:43 PM

Thx a lot for your reply.. but i still couldnt get it done.. it was giving errors that i dont know whyy just had no solution and google was also not familiar with the errors.. errors such that the values need to be unitless :/

but i managed to get it done without for loops.. i still dont know how its done and in this configuration it should not even work.. but im just glad i got the answer :/

Register to Reply
Register to Reply 2 comments

"Almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, vote them!

Previous in Forum: Software Operation   Next in Forum: Programming With MPI

Advertisement