20,436 reputation
12769
bio website
location
age
visits member for 2 years, 7 months
seen yesterday

Sep
10
comment Turn expression into function
....on the side effect, it is done by documentation. Each function should document any side effects it makes. Things like creating a file, or updating a file, and such are considered a side-effect and can't be prevented by the language. But should be documented in the function header, so someone reading this function later on, can see right away what are its side-effects.
Sep
10
comment Turn expression into function
@jVincent no, I meant true function, not pure. true function in the mathematical sense. it only acts on its input via arguments, and has local variables and has no side effects other than its return value. A true function does not even allow passing argument by reference. Ada functions used to be true, until Ada 2012 where they relaxed allowing a function to be passed an argument by reference (called in-out). Many in Matematica write functions that are not true functions, where some of its input is passed by arguments and some of its input is global.
Sep
9
answered Turn expression into function
Sep
9
comment Why the EuclideanDistance of these 2 exact points generates the warning N::meprec?
Yes, same thing on my computer also, kernel actually crashed and I got an error message from C++ library. I did not say this will work, I said to try it :)
Sep
9
comment Why the EuclideanDistance of these 2 exact points generates the warning N::meprec?
see See wolfram.com/learningcenter/tutorialcollection/… page 20 for more discussion.
Sep
9
comment Why the EuclideanDistance of these 2 exact points generates the warning N::meprec?
No, not a bug. This is how Mathematica works. I think it is similar issue as this one mathematica.stackexchange.com/questions/31822/…. If you do this: $MinPrecision = $MachinePrecision; $MaxPrecision = $MachinePrecision; EuclideanDistance @@ pts the warning goes away. Mathematica needed more than 50 precision to decide on this one. That is all. You can also try $MaxExtraPrecision = Infinity; EuclideanDistance @@ pts but then you have to wait long time....
Sep
8
awarded  Enlightened
Sep
8
revised Specify values for X-axis and Y-axis ticks and control their format
deleted 46 characters in body
Sep
8
answered Specify values for X-axis and Y-axis ticks and control their format
Sep
8
comment Specify values for X-axis and Y-axis ticks and control their format
Which version are you using?
Sep
8
comment How to pick a solution from a list of solutions using a test?
solutions=x /.Solve[f[x] == 0, x]; Pick[solutions/. b3 -> 2,Min[solutions]/.b3 -> 2] gives {1}. You need to do the replacement before Pick uses them.
Sep
8
awarded  Nice Answer
Sep
8
revised How to extract data from contour plot as a text file?
added 373 characters in body
Sep
8
comment How to extract data from contour plot as a text file?
@SjoerdC.deVries if the coordinates is what is needed, I updated the answer. thank you.
Sep
8
revised How to extract data from contour plot as a text file?
added 373 characters in body
Sep
8
comment How to extract data from contour plot as a text file?
@MMM I do not follow you. Where did this 2 columns come from and what they represent? May be all what you needed then is a simple Table command. You have to be clear what is it you want as I am not really following you.
Sep
8
comment How to extract data from contour plot as a text file?
You asked for contour data. The above is the contour data. There are 11 rows. One for each contour.
Sep
8
revised How to extract data from contour plot as a text file?
cleaned
Sep
8
answered How to extract data from contour plot as a text file?
Sep
8
comment How to keep markers as dots in a joined ListPlot?
fyi, can also use the new command ListLinePlot for this. No difference for this case. ListLinePlot[data, ImageSize -> 700, PlotMarkers -> {Automatic, 12}] !Mathematica graphics