scalar value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
scalar value
- Labels:
-
Algebra_Geometry
-
Civil_Engineering
-
Other
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Edited to add: I see Luc has beaten me to the draw. Morning, Luc. 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank u . It works the way it should.
If you have some time can you explain what does this expression mean?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
No problem, Yusra.
![](/skins/images/695EE5AD3E567050FEDD72575855ED93/ptc_skin/images/icon_anonymous_message.png)