Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
Hello,
I have a column of data.
If the column of data has a negative number, I would like to replace that number with a very small positive number, 10^-5.
I've attached my worksheet explaining what I want to do.
Any advice?
Thanks!
Solved! Go to Solution.
May be so:
How about the attached, slightly different approach to Valery's.
Mike
Here's a third method. ( wonder how many different ways we could come up with!)
Alan
Here's a third method. ( wonder how many different ways we could come up with!)
Very nice.
I always look forward to seeing your examples.
Mike
AlanStevens wrote:
Here's a third method. ( wonder how many different ways we could come up with!)
Alan
The best method is not a ***.xmcd.zip but the PICTURE
I have no time for Mathcad open, the file open (zip -> xmcd) etc for this simple task...
The best method is not a ***.xmcd.zip but the PICTURE
I have no time for Mathcad open, the file open (zip -> xmcd) etc for this simple task...
On that note......
Mike
Valery Ochkov wrote:
The best method is not a ***.xmcd.zip but the PICTURE
I have no time for Mathcad open, the file open (zip -> xmcd) etc for this simple task...
You're right, but it's taken me half-an-hour to figure out how to do it! I've copied to Paint and saved as a .png file, but is there a more direct way from within Mathcad itself?
Alan
AlanStevens wrote:
Valery Ochkov wrote:
The best method is not a ***.xmcd.zip but the PICTURE
I have no time for Mathcad open, the file open (zip -> xmcd) etc for this simple task...
You're right, but it's taken me half-an-hour to figure out how to do it! I've copied to Paint and saved as a .png file, but is there a more direct way from within Mathcad itself?
Alan
half-an-minute for me
Valery Ochkov wrote:
half-an-minute for me
Hopefully, for me also in future!
Alan
and another variation in just 2 lines
Alan,
I copy and paste straight into IrfanView (Which is freeware) and save the image that make literally less than a minute.
Mike
david h wrote:
Hello,
I have a column of data.
If the column of data has a negative number, I would like to replace that number with a very small positive number, 10^-5.
I've attached my worksheet explaining what I want to do.
Any advice?
Thanks!
David, say please what is a correct answer!!!
Wow!
Thanks for all of the advice. I supposed I started a competition.
Let me take a look...
It looks like Ian's was the most straight forward, though they were all good!
I have to disagree. He has used a range variable which I try and keep away from at all costs.
All work, so all good 🙂
Mike
I am a novice user, so I don't know the benefits of not using range variables. Why do you stay away from them? I suppose I should know.
I don't agree with Mike on this one, range variables are fine. Problems can arise when using range variables as variables, like x=2...10 and then using x in equations. Using range variables to construct x is fine.
They are useful in some applications, but the majority of Mathcad functions work with vectors. Why define the variable at worksheet level when it can be defined within the program?
I've always tried to stay away from range variables - just a personell opinion though.
Mike
I did this a long time ago, it's a portion of an shear wall interaction diagram calc, and I would probably change some things if I were to rewrite it now, but there is nothing wrong and the use of the range variable is clear, even to someone that does not know mathcad. (Vectorizing would not be obvious to a nonuser)
Personally, I find it easier to write this way first, and if necessary, go back after it's verified to change to programs and possibly use vectorization. Debugging is a bugger.
I do agree that in certain applications the use of range variables is valid, but as you said it comes down to personnel preference.
Mike
I agree, personal preference, and experience.
But, the range variable is getting a bat rap, it is a very powerful variable and I (and I assume many) have, and will, used it extensively. You should not try to stay away from it, just don't use it as a variable, use it as intended, an index
As I have said below, because the majority of Mathcad functions work with vectors, which hasn't been created using Ian's method.
Mike
david h wrote:
Wow!
Let me take a look...
Russian Prince Alexei takes a look (chooses) on his bride :
I think me and you were left on the stand :-).
Mike
Mike Armstrong wrote:
I think me and you were left on the stand :-).
Mike
She was Maria Miloslavskaya- see http://en.wikipedia.org/wiki/Maria_Miloslavskaya
Brillant.
Mike