×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

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!
  • Students Click Here

*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

Jobs

While Loop in Mathcad

While Loop in Mathcad

While Loop in Mathcad

(OP)
When I try to use nested while loops I run into problems. Sometimes the program freezes with a green bar around the program.

RE: While Loop in Mathcad

Usually, that means you did something wrong in the program,  You have to break it up and run the individual segments and debug it.

TTFN

FAQ731-376: Eng-Tips.com Forum Policies

RE: While Loop in Mathcad

It looks like the condition for the while loop to end is never met, so it keeps on executing. Turn on debugging and the trace window and add trace(something) to your loop.

RE: While Loop in Mathcad

(OP)
I am trying a simple program to sum all the integers, say, from 1 to 10 twice. I am trying to use two while loops, the inner one (while i less than or equal to ie) to sum from i = 1 to 10 and outer one from n = 1 to ne. But I fail to get the correct result of 110 when I set ne = 2. It just gives the sum as 55 whatever value of ne I set. Unfortunately I cannot copy the program statements here. Any suggestions?

RE: While Loop in Mathcad

There is, at the bottom of each posting box, the link to Engineering.com's file upload.  Preferrably, you should post in Mathcad 11 format for those of us that don't use M14.

TTFN

FAQ731-376: Eng-Tips.com Forum Policies

RE: While Loop in Mathcad

(OP)
I hope the file whileuse has been uploaded.

RE: While Loop in Mathcad

(OP)
As I was not sure if the file whileuse in mathcad 11 was uploaded, I am uploading it again. Sorry for the trouble.

RE: While Loop in Mathcad

(OP)
Thanks I will try again

RE: While Loop in Mathcad

(OP)
Occupant:
Thanks for your help. It not only helped in the particular small program that I sent but also in a much bigger program requiring iterative computations to solve a differential equation numerically.

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!


Resources