1,258 reputation
320
bio website
location
age
visits member for 1 year, 9 months
seen Aug 23 at 8:18

Jul
27
comment how to write TableForm expression into file?
@Mr.Wizard OK, I understand.
Jul
27
comment how to write TableForm expression into file?
@Mr.Wizard what does one lingering concern would be that it might not perform as well as a manual approach using WriteString mean?
Jul
27
comment how to write TableForm expression into file?
@Mr.Wizard Thank you, Mr. Wizard. I mean if data = {{"Ca", 1.123456789, 1.98765432}}, then OutputForm[TableForm[data, TableSpacing -> {0, 3}]] >> "test" will give Ca 1.12346 1.98765, you can see the accuracy is downgrade. But Lou gives addtional answer that suggest using SetAccuracy, it works well. What do you think of Lou's method?
Jul
26
comment how to write TableForm expression into file?
This can be seen if you try real number like 0.1234567896 instead of integer.
Jul
26
comment how to write TableForm expression into file?
As I metioned in the reply to Algohi. I just found that the accuracy of numbers that OutputForm gives is much lower than Export gives. But Export seems not univeral in file operation like OpenWrite and Write, so is there a better solution?
Jul
26
comment how to write TableForm expression into file?
@Algohi Thank you! I think Lou's answer which is to control TableSpacing is more flexible, for example in OpenWrite and Write cases? But there is a problem, the accuracy of the number that OutputForm gives is not enough sometimes, do you know other method to solve this?
Jul
26
comment how to write TableForm expression into file?
Wonderful solution! Thank you!
Jul
18
comment Mathematica 10 doesn't support path containing Chinese characters
@TetsuoIchii So this is a bug?
Jul
7
comment Defining a function that differentiates another function with rule replacement
I found this works: hh[i_][x_, y_] := {{tt, x + Sin[x]}, {y, 1}} /. rulelist[[i]]; hhpar[x_, y_, i_] := Derivative[1, 0, 0][hh[i][#1, #2] &][x, y]; While this not works: hh[x_, y_, i_] := {{tt, x + Sin[x]}, {y, 1}} /. rulelist[[i]]; hhpar[x_, y_, i_] := Derivative[1, 0, 0][hh[#1, #2, i] &][x, y];
Jul
7
comment Defining a function that differentiates another function with rule replacement
Thank you very much!
Jul
7
comment Defining a function that differentiates another function with rule replacement
And I forgot what this kind of function definition hhpar[j_, k_][x_, y_, i_] is called? Could you show me a link which has a discussion on this kind of function definition?
Jul
7
comment Defining a function that differentiates another function with rule replacement
Thank you, m_goldberg. Your definition really works, but I don't understand why my definition gives wrong answer. Could you explain a little? I think I miss a lesson on function definition.
Jul
6
comment Defining a function that differentiates another function with rule replacement
@eldo Thank you, eldo! But it doesn't work.
Jul
6
comment How can I avoid a scoping problem when differentiating?
@Szabolcs Wow! So quick! Thank you very much! This works, and I thought I known the reason, but it terms out that I actually didn't know the true reason is x at that time.
Jun
26
comment How to get correct numerical integration which should be zero?
Thank you very much! AccuracyGoal works perfectly
Jun
26
comment Strange numerical integration result
Thank you very much! Trace is so useful!
Jun
26
comment Strange numerical integration result
What is more, the integration of berrycur is rather slow, it tooks me 40 seconds to give result 12.5664. Do you know how to speed it up?
Jun
26
comment Strange numerical integration result
Hi, MikeLimaOscar! Great explanation! How did you come up with the idea to test Integrate[berrycur[x, y][[1]], x, y]? This explains the unreasonable result. But I still want to know why Integrate gives (x^2 y)/2??? It seems that (x^2 y)/2 is the integration of x y in terms of x.
Dec
18
comment How to constrain memory usage on HPC?
Sorry for late response. I tried Evaluation -> Parallel Kernel Configuration, uncheck the "try to relaunch failure kernels". But it didn't work.
Dec
14
comment How to constrain memory usage on HPC?
I currently use Linux and Mathematica 8. I don't know how to use lowlevel link-communication to do this. But I found that even if you don't evaluate ParallelTable expression. Just a normal non-parallel expression like RandomInteger[100, {500, 500, 500}] for second time, the memory will still not get controlled.