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

Looping the root function

Looping the root function

Looping the root function


I want to find and save the root of a function, make a small change to a parameter in the function and find the new root.

I defined the parameter over an interval, but MathCAD's root function doesn't like this (I get a message that says root only works with matrices or scalars), though there are no errors if I define the parameter with only one value.

I also tried using a for loop to evaluate the root, but MathCAD doesn't give either an output or an error, nothing happens.

Is there another way to go about this?


RE: Looping the root function

Can you post a worksheet?



RE: Looping the root function

>>  Nowhere do you define beta.nd, so why is it a surprise that it's flagged as undefined?

>>  Your construct of k.nd is interesting, but not necessary.  Do:


this will create an indexed variable k.nd

Also, you need to define beta.nd somewhere near the top of the sheet.

Then, you do



FAQ731-376: Eng-Tips.com Forum Policies

RE: Looping the root function

Thanks! your explanation was very logical, and much easier than creating loops

Since I beta.nd was the argument to my function, I thought it did not have to be defined

RE: Looping the root function

It's an argument, yes, but when you call the root function, it needs a starting guess value to start the root finding algorithm.


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


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