23,082 reputation
13377
bio website
location
age
visits member for 2 years, 10 months
seen 5 hours ago

Jan
10
comment Graphics Function Definition Style (Using SubValues vs. DownValues)
see mathematica.stackexchange.com/questions/544/… and this mathematica.stackexchange.com/questions/7999/…
Jan
10
comment Display functions without dependence?
This rule does not work for all functions of the independent variable. For example a[t] Exp[t] gives a Exp[t]. But may be that is ok with the OP, just wanted to point it out just in case.
Jan
10
comment Fourier Series of “Split” Defined Function
@ErikVesterlund For that, you can simply convert it to real. Like this: FourierSeries[x, x, 2]; ExpToTrig[%] which gives 2 Sin[x] - Sin[2 x]
Jan
10
comment Issues with $MachineEpsilon
The wiki web page linked to above has an implementation for finding $\epsilon$ using many different languages, is it possible to show an implementation using Mathematica as well? May be then it can be added to the wiki page along with all the other languages?
Jan
10
comment Fourier Series of “Split” Defined Function
@ErikVesterlund there are different definitions for the integral used to obtain the Fourier coefficients. In signal processing vs. say control vs. pure math. Different books use different definitions. So, if you are trying to compare results with some book, you need to make sure the same definitions are used in your code, else you'd think M is making a mistake. The help explains all the main 4 definitions and how to change them using FourierParameters->
Jan
10
comment Filling only part of a plot
Do you have a function to use to show how to do it? You can start by looking at Filling
Jan
10
comment Fourier Series of “Split” Defined Function
Yes, there is a way. Do you have an example of a function to use to show you? For your second question: Assuming[Element[n, Integers], Simplify[Cos[n Pi]]] gives (-1)^n and Assuming[Element[n, Integers], Simplify[Sin[n Pi]]] gives 0
Jan
9
comment Is linear interpolation applicable here
@Dr.Java you ask what language did you use?, I am using Mathematica, or now known as Wolfram language. This is a programming language made by company called Wolfram research. They have student version, and also personal version and commerical version. see wolfram.com to buy a copy from the online store there.
Jan
7
comment Conditional range in a parametric plot
it will help to post a self contained small complete example than fragments. This way, one can see better what you are trying to do.
Jan
7
comment How to generate the following partitions
There is no one solution to this. For example sets[3] gives {{1, 2, 3}, {1, 2, 4}, {1, 4, 6}, {2, 3, 5}, {3, 5, 6}, {4, 5, 6}} but what is wrong with {123},{234},{345},{456},{561},{612} ?
Jan
7
comment How would I get the best quality plot into a TeX editor which includes the legends?
@MarkusRoellig if you try to save a plot as png, when the notebook is set at magnification not 100%, you'll notice the png image quality is not good when viewed using external image viewer. Try again, but with 100%, you'll see it is better quality. It has to be 100%. At least that was the case when I last tried it. windows 7, v 9.01
Jan
7
comment How to generate the following partitions
There are more than one answer to this. What about (1,2),(2,3),(3,4),(1,4)
Jan
7
comment How would I get the best quality plot into a TeX editor which includes the legends?
make sure the notebook window magnification is set to 100%. Otherwise the png quality will be bad. This is a known issue.
Jan
7
comment FindMinimum gets confused by If[…]
see mathematica.stackexchange.com/questions/18393/…
Jan
7
comment FindMinimum gets confused by If[…]
try chisq[x_?NumericQ] !Mathematica graphics
Jan
7
comment Forcing Mathematica to recognize a symbol without defining it
Because chrom it an atomic symbol when first starting notebook. i.e. there are no values associated with it. Hence evaluation will stop and return the symbol chrom as result of evaluation, and assign this result to chrom itself. So chrom points to its self. A self referential pointer. But since chrom now is entered in Mathematica internal symbols lookup table, it become black colored. It does not matter than it points to itself, as long as it is in the symbol table, it is colored black. So n=n is trick to force n to be added to the symbol table. Just like n=3 adds it to the symbol table
Jan
7
comment Forcing Mathematica to recognize a symbol without defining it
yes, n=n will also work. So now you have 2 ways to do it. I am sure where are more. Pick the one you like :)
Jan
7
comment How to generate the following partitions
I do not understand why {1,2,3,4} gives {1,2},{1,3},{2,3},{3,4} based on what? but it kind of is such that the common number of elements in any two sets are minimized and equal to at most a common value I am struggling also to understand what this means. but may be you can look at Subsets and see if it does sort of what you want.
Jan
7
comment Forcing Mathematica to recognize a symbol without defining it
how about chrom = Unevaluated[chrom] now it is not blue anymore next time it is typed. and no value is associated with it either.
Jan
4
comment Delete False values from a list
In Mathematica, before starting to implement something, I find it best to first search to see if there is a command that might do what I want. Mathematica search is very good. If you type ?*Delete* for example, it will show you all commands with the word Delete in it. Then you could spot from the list, the ones that might do what you want and examine them more. This way, you would have found the DeleteCases easily yourself. screen shot !Mathematica graphics