Skip to main content
1-Visitor
September 4, 2012
Question

edit mathcad's own function

  • September 4, 2012
  • 2 replies
  • 3046 views

Hello,

as you can see in my other threads, i am a very lazy person.

Actually i want to edit a Mathcad function, so that i do not need to write my own file.

(In detail i want to edit the root-function (in don't know the english name of that function , in German its "wurzel") which finds zeros.

I want to edit the function so that it breaks if the x-value is getting smaller than 0 and returns a string.)

Is that possible?

best regards

2 replies

19-Tanzanite
September 4, 2012

Do you mean something like this?

ROOT.PNG

Alan

1-Visitor
September 4, 2012

Yes, but i would prefere , if the root functions stops before it has its exact result.

For me it is just important to know, that the Result is <0. The progress to find a zero <0 can last a long time. So i could accelerate the whole calculation, when the root function stops.

19-Tanzanite
September 4, 2012

Ok. How about:

ROOT2.PNG

though I don't know if this will be any quicker for your problem!

Alan

1-Visitor
September 5, 2012

Since functions in general can have zero to multiple roots, I don't know why you wouldn't graph it first.

You could then just look at it to see if any roots are > 0.

This would avoid some programming to check for various cases.

1-Visitor
September 5, 2012

The Mathcad Function is not just a simple function like f(x)=x²+47 or something like that.

There are many interlaced functions like f(x,y,z)=x²+g(x,z)/3 +h(z,x)......

The technical background is, that i can calculate the workload of an complex electrical system with a 5-dimensional (a,b,c,d,e) workingrange. Therefore it is not easy to graph my function. Furthermore i want to get the result automatically. When i graph it, i have to check the curve by myself.

My functions calculates the maximum a with varying b,c,d,e so that the electical system behind that is not overloaded.

But as far as i unterstand the system and my calculation there can only be one zero between 0 and something about 1.2.

Therefore i am (at this point) comfortable with Alans solution.

Best regards