Reputation
31,711
Next tag badge:
99/100 score
35/20 answers
Badges
1 42 106
Newest
 Enlightened
Impact
~321k people reached

Jun
28
comment How to export images in EPS format that can be opened in CorelDraw
You should use Linux, then all what you have to do is click on the file ;) but I would not even save from Mathematica as eps. You could save the image to pdf, and then crop it then convert it to eps, like this: pdfcrop --margins 10 --clip image.pdf image.pdf then pdftops -f 1 -l 1 -level3 -eps image.pdf pdfcrop comes with texlive. Very nice program. It removes all empty space around the image from the pdf. I have script that does the above for all my pdf images.
Jun
27
comment How to get arrowheads scaled to be a fixed fraction of the arrows' lengths?
Similar to above. arrow[{pt1_, pt2_}] := {Arrowheads[0.002 EuclideanDistance[pt1, pt2]], Arrow[{pt1, pt2}]}; arr = arrow[#] & /@ {{{1, 0}, {0, 1}}, {{3, 2}, {1, 0}}, {{0, 5}, {3, 2}}, {{-5, 0}, {0, 5}}, {{3, -8}, {-5, 0}}, {{16, 5}, {3, -8}}, {{-5, 26}, {16, 5}}, {{-39, -8}, {-5, 26}}}; Graphics[arr] screen shot !Mathematica graphics
Jun
27
comment Mathematica equivalent to Python long raw strings? handling escape characters in packages
No problem Simon. Everything is working very well. Except that when an problem happen, hard to know from which line it came, since I do not see the commands as they run. But I am using lots of Print in the script to help :) Thanks.
Jun
26
comment Union of two or more lists
Your output does not match what you describe. r1 = Union[list1[[-1]], #] & /@ list2; r2 = Union[list2[[-1]], #] & /@ list3; r3 = {r1, r2}
Jun
26
comment Does Mathematica have a built-in tool that allows one to operate on both sides of an equation?
In Maple, all this works out of the box as is. I always wondered why in Mathematica these things are so much harder. Here is screen shot from my Maple session now !Mathematica graphics (ofcourse, there are things that are much harder to do in Maple than in Mathematica as well)
Jun
26
comment Mathematica equivalent to Python long raw strings? handling escape characters in packages
Would you happen to know why this method does not work when using the syntax math.exe < foo.m and one must use math.exe -script foo.m ? The reason I am asking is that using the first syntax above allows one to see the commands (IN and OUT) on the screen as they are evaluated as discussed in this question which makes it easier to see where the error is. Would be hard to modify your method to make it work with the first case as well? thanks
Jun
26
comment Solving non-linear ODE analytically in mathematica
I do not know if there is any special thing to do, just type x[T0]==0, as in ClearAll[beta, c, k, x, t]; eq = x'[t] == beta*x[t] - (c - x[t])^2/(4*k); DSolve[{eq, x[T0] == 0}, x[t], t] and I get this answer: !Mathematica graphics
Jun
26
comment Solving non-linear ODE analytically in mathematica
V10.1 solves it. Did you try it on your version and not get an answer?
Jun
26
accepted Mathematica equivalent to Python long raw strings? handling escape characters in packages
Jun
26
comment Mathematica equivalent to Python long raw strings? handling escape characters in packages
I've been testing it, and so far I see no issues. It also handles embedded strings and everything else like Python's r""".
Jun
26
comment Mathematica equivalent to Python long raw strings? handling escape characters in packages
Very nice! It works very well so far. I also wrote the string to Latex file, and it compiled with pdflatex with no problems. I tested it on this file SetDirectory["G:\\tmp"]; Print[Directory[]] s=r"""\documentclass[12pt,titlepage]{article} \begin{document} \title{title} \date{1/1/2015} The following in known equation $\sin^2(x)+\cos^2(x)=1$ and this is 100% correct. This was written on 1/1/2015 and this is a string "I am a string" and this is \\n which is left as is. \end{document}"""; Print[s] str = OpenWrite["foo.tex"]; WriteString[str,s]; Close[str] thanks.
Jun
20
accepted SetDirectory[NotebookDirectory[]] in one notebook causes Directory[] to change in a different notebook
Jun
19
comment Mathematica equivalent to Python long raw strings? handling escape characters in packages
@Pickett I run the .m file using Mathematica, but from command line, not from the notebook. it is an .m file. How will I write a script that look into huge .m file of Mathematica code, prarses it, looks for certain places with strings, and replace each "\" with "\\"? Also there are things like "\n" in there, which should be left alone. It is not that easy to do. I also have to do this each time I edit the .m file again. Way too complicated. Python solution is much simpler actually. I just write r""".....""" and that is it.
Jun
19
comment Solve differential equation using a integral form boundary condition
Ok, I agree Mathematica result from my method is not correct, but my question is, what did I do wrong? where in the steps I did the error was?
Jun
19
revised Mathematica equivalent to Python long raw strings? handling escape characters in packages
changed title to say packages
Jun
19
comment Mathematica equivalent to Python long raw strings? handling escape characters in packages
@Pickett, no I do not want to get into XML and all that. way to complicated. I simply want to use Mathematica and generate Latex from it without having to keep typing "\\" all time.
Jun
19
comment Mathematica equivalent to Python long raw strings? handling escape characters in packages
@Pickett, I am confused. So what should I type for my example above? In the .m file? I do not want to put "\\" in there. I still do not know what the syntax I am supposed to use.
Jun
19
comment Mathematica equivalent to Python long raw strings? handling escape characters in packages
@Pickett How to type the solution in plain text? as in .m file? I tried TextCell but not sure I am doing it correctly. Screen shot !Mathematica graphics I do not know how to do the ctrl-9 and ctrl-0 stuff in text file. I use plain text .m files. If you can show how to do it, using my example above, without using notebook interface, just using plain text input, then that will help
Jun
19
asked Mathematica equivalent to Python long raw strings? handling escape characters in packages
Jun
18
revised SetDirectory[NotebookDirectory[]] in one notebook causes Directory[] to change in a different notebook
clean