1,127 reputation
312
bio website
location China
age
visits member for 9 months
seen 7 hours ago
stats profile views 134

Sep
20
comment ReplaceAll[] and Limit[] don't give correct results for this expression under extreme variables
@celtschk So we can simply regard MachinePrecision as something difficult to handle and always avoid it and choose a exact precision or rationalize the number will be better when having numeric calculation? By the way, it really took me a while to notice M. is for mathematica :D.
Sep
20
comment ReplaceAll[] and Limit[] don't give correct results for this expression under extreme variables
If so, well, it's a little different from my imagination, since I think the approximation will only be done in the last step and the precision before the last step will be as high as possible (in my mind it almost equals to infinity…), just like what I turn to do when calculating something manually…and now I notice that my imagination is unreasonable.
Sep
20
comment ReplaceAll[] and Limit[] don't give correct results for this expression under extreme variables
I've read the answer and the links given by J.M and @Mr.Wizard. Let me try to retell it to see if I've understand it: The error occurs because when doing numeric calculations Mma will keep the precision step by step i.e. several steps of approximation have been done before the final result comes out.
Sep
20
comment ReplaceAll[] and Limit[] don't give correct results for this expression under extreme variables
@celtschk So a simpler example can be, 1.00+0.00100 is calculated to 3 digits, then the answer is 1.00, right? If so, OK…I know this, though my lesson say little about numeric error analysis it's still involved in the little, but I don't expect it also exists in mathematica 囧.
Sep
20
comment ReplaceAll[] and Limit[] don't give correct results for this expression under extreme variables
@whuber Merge? You mean shape two as one? It is possible? That would be good! I have no objection.
Sep
19
comment ReplaceAll[] and Limit[] don't give correct results for this expression under extreme variables
@halirutan Haha, never mind, and in fact I really don't have numerical error analysis in my university…at least it's not a required course for my major and in my memory I never see this in the list of elective course, too… our lessons always talk about those analytical solutions and say little about numeric solutions, usually the books just say "the numeric solution should be done with computer". So, can you explain the details?
Sep
19
comment For[] or While[] can't be used inside Manipulate[]?
Albert found the truth for While…see my edit for the question for more details.
Sep
19
comment For[] or While[] can't be used inside Manipulate[]?
@AlbertRetey ……You get the truth, I've added the conclusion to the question. OK, this time question is completely solved :D.
Sep
18
comment For[] or While[] can't be used inside Manipulate[]?
Hehe, yeah, that's a good resource, and as I said in the comment below, this question is more for curiosity :D, and, I've added the most puzzled code to my question: that's indeed a sample that can't be solved without adding both i and date as the local symbols.
Sep
18
comment For[] or While[] can't be used inside Manipulate[]?
@AlbertRetey Oh, I should have add the sample…in fact my i=1 is set in the expressions:Manipulate[Module[{j}, date = Table[0, {num}]; j = 1; While[j <= num, date[[j]] = Sin[j]; j++]; ListPlot[{date}]], {{num, 2}, 1, 20, 1}]
Sep
18
comment For[] or While[] can't be used inside Manipulate[]?
Hehe, yeah, I know, in fact the original question isn't raised by me but I found myself unable to tell the exact reason for the problem so I turn to here…still thanks for your vivid explain for the functional programming feature of Mma!
Sep
18
comment For[] or While[] can't be used inside Manipulate[]?
Oh, I forgot date!…But in the sample with For, it still works fine though I only add i as the local symbol, why?
Sep
18
comment For[] or While[] can't be used inside Manipulate[]?
@cormullion Yeah, quite similar and the solution with TrackedSymbols:> in your link works! But I still wonder why the solution with Module doesn't work for While
Sep
14
comment How can I plot the complex graph of $x^x$ in Mathematica?
Try this:Plot[{Re[x^x], Im[x^x]}, {x, -1, 2}, PlotRange -> All]
Sep
11
comment Calling part of a variable in a user defined function
I think I get one of the point: If[TrueQ[tx[[i]] == ""], (symbol[[i]] = "Please Enter"),(symbol[[i]] ="Right") ]doesn't give back a value.symbol[[i]] =should be deleted here.
Sep
11
comment Calling part of a variable in a user defined function
I don't understand the code very well… but I think a semicolon is needed before Panel.
Sep
10
comment Labeling individual curves in Mathematica
@Artes Wow, how did you find the options of Tooltip? I mean the {_, color_, line_}, tip_ in the code, it seems not to be mentioned in the document.
Sep
7
comment How to avoid this kind of numerical error caused by extreme parameters when using NDSolve?
@AlbertRetey So the crux is that something is wrong with the generation of the interpolating function? OK, this gives me some inspiration, by the way, this question combined with this question really inspire me a lot: the effect of numeric error in some case may be much greater than I expect, perhaps I will raise other questions about it if I succeed in making related toy code later…
Sep
3
comment How to avoid this kind of numerical error caused by extreme parameters when using NDSolve?
It seems that Nasser didn't notice my comment…well, it doesn't matter! so, this question and this question are solved, great!
Aug
30
comment How to avoid this kind of numerical error caused by extreme parameters when using NDSolve?
@ruebenko Oh, you remind me, the k in the equation should not be called coefficient of thermal conductivity, its name is actually thermal diffusion coefficient, let me correct it.