Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
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
Do you mean something like this?
Alan
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.
Ok. How about:
though I don't know if this will be any quicker for your problem!
Alan
Perfect, thanks alot.
Arne Claußen wrote:
Perfect, ...
Not quite! when there is a positive root, it's worked out twice in my previous attempt!! Better as:
Alan
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.
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