cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

choose minimum value

YA_10963798
12-Amethyst

choose minimum value

I need to make mathcad to choose the minimum value when it draws the plot. The next value can't be bigger than the previous value?

Please Help 

YA_10963798_0-1708499717872.png

 

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:YA_10963798)

I am not sure but is this close to what you had in mind?

Werner_E_0-1708556278565.png

 

View solution in original post

12 REPLIES 12
LucMeekes
23-Emerald III
(To:YA_10963798)

Please attach your Prime worksheet and state which version of Prime you are using.

 

Success!
Luc

Have a look please

I need to fix this calculation 😥

LucMeekes
23-Emerald III
(To:YA_10963798)

This expression:

LucMeekes_0-1708530493920.png

most probably does not do what you have in mind.

It contains a bad construct and results in qc;i being undefined.

As your file depends on an excel sheet, you should also attach that excel sheet.

 

Success!
Luc

this is the excel sheet 

thanks

Werner_E
25-Diamond I
(To:YA_10963798)

I am not sure but is this close to what you had in mind?

Werner_E_0-1708556278565.png

 

can you please attach the worksheet 

 

Werner_E
25-Diamond I
(To:YA_10963798)


@YA_10963798 wrote:

can you please attach the worksheet 

 


Sorry, I just played around with your sheet but did not save it.

Try to retype what I had shown in the picture and if you experience problems, come back and post the sheet.

 

Keep in mind that what I posted only works on the second "half" of the data, the one colored red in the following picture

Werner_E_0-1708612316258.png

That's the reason I am looking for the position of the largest value in the data (the point to the far right) using the "match" function and start the loop which compares each value with its predecessor just from there.

If a similar approach should also be applied to the first "half" of the data (the blue one) you would have to use a second loop but exchange the > for a <.

 

EDIT: OK, I reloaded your worksheet and implemented the foregoing mentioned treatment of both data "halves" in a utility function which I called "straighten( )". I guessed that you would like to treat more than just one set of data in a similar way and so a function for doing so makes sense. You may put it anywhere in the sheet (maybe in a collapsed area) as long as its before its first usage.

If you don't want the treatment of the first data "half" you can simply delete the first for-loop.

Werner_E_1-1708613303793.png

 

Worksheet attached (format Prime 9)

 

I really appreciate your help

Hi there can you please help me with the following : my manager asked me to change the program you did to this 

 

iterateor i from nI to NII. Then Store Qmin till then. Check if Qi<Qmin if yes, Qmin = Qi, otherwise Qi=Qmin. Then next step.

Then nest the whole thing in another iterator j, where you change NII every time. Start at NII min (at level -0,7D) and end iteration at NIImax (at level -4D).

Same procedure for NII and NIII.

YA_10963798_0-1709206329107.png

 

Werner_E
25-Diamond I
(To:YA_10963798)

Sorry, I have no clue what you or he is talking about.

You have to keep in mind that I have no experience whatsoever in the field you are working in. I just picked up the plot of one vector over another you provided, noticed that you did not want the graph to "go back" and so simply fixed it by changing the values in question.

But I wasn't at all sure whether this could actually be a solution for you...

Thank you for at least trying your help was so appreciated.

Thank uuuuuuuuuuuuuuuuuuuuuuuuuuuu

You saved my life , Can't thank you enough 

Announcements

Top Tags