Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
Good morning, Yusra.
I hope you are also doing well.
There are many ways to skin this particular cat. Here are a couple, ...
I'm sorry, but I have only Mathcad Prime 10, so the edited worksheet won't be of any use to you. Hopefully, the programs aren't too difficult to enter.
I must check where you define that exponential and f1, though. The max values and the first ones I've checked look suspiciously similar.
Stuart
The f1[i you use in your program is an Array, you cannot compare it to a scalar. Maybe you want to compare it's minimum to 1:
min( f1[i ) < 1
Success!
Luc
Edited to add: I see Luc has beaten me to the draw. Morning, Luc. 🙂
Hi Stuart,
Hoping you doing well.
Actually I need the result to vector as well. I needed all the results in f1 to be one or bigger . Do you have any idea to do so?
Thanks in advance,
Yusra
Good morning, Yusra.
I hope you are also doing well.
There are many ways to skin this particular cat. Here are a couple, ...
I'm sorry, but I have only Mathcad Prime 10, so the edited worksheet won't be of any use to you. Hopefully, the programs aren't too difficult to enter.
I must check where you define that exponential and f1, though. The max values and the first ones I've checked look suspiciously similar.
Stuart
Thank u . It works the way it should.
If you have some time can you explain what does this expression mean?
It uses boolean results to select which value you want. All Mathcad comparisons return 1 (true) or 0 (false), so if you multiply a boolean by any number you get that number back.
In the case above, when an f1 value is less than 1, f1 < 1 = 1, f1 ≥ 1 = 0, so the whole expression is 1 + 0 · exp3DRe which is just 1.
Similarly, if the f1 value is greater than 1, f1 < 1 = 0, f1 ≥ 1 = 1, so the whole expression is 0 + 1 · exp3DRe which is exp3DRe.
Hope that helps, Yusra.
Stuart
PS. My previous mystery was solved. The f1 values are the same as the exp(3·DRe) value. Is there a reason you redo the calculation rather than just leaving the f1 values as they are?
This is very fruitful . Thank you so much.
I redid the calculation because I needed to show that the first calculation doesn't meet the criteria ( f1<1) so I wanted to show that I make an assumption that all the values less than 1 will be equal to one in the coming calculations
No problem, Yusra.