27,545 reputation
13791
bio website
location
age
visits member for 3 years, 2 months
seen 1 hour ago

Jun
13
comment How to use Button as a control in Manipulate
Yes, I know, Plot localized the x, else it wont work, but I meant a different name would be better for readability and less confusing. that is all.
Jun
13
comment How to use Button as a control in Manipulate
There is x as Boolean, and also x in the plot range value (argument to Plot)?
Jun
12
comment NDSolve gives wrong results for “stiff system”
see reference.wolfram.com/mathematica/tutorial/… for the options...
Jun
12
comment NDSolve gives wrong results for “stiff system”
Ijust tried it with g = NDSolve[{c'[e] == f[c[e], e], c[0] == 0}, c, {e, -150000, 0}, Method -> {StiffnessSwitching, Method -> {ExplicitRungeKutta, Automatic}}, AccuracyGoal -> 5, PrecisionGoal -> 4] and get no error. You might try this and see if the plot looks ok now
Jun
12
comment NDSolve gives wrong results for “stiff system”
can you post complete self contained code that one can copy and run? You say ` and f[c[e], e] is given by` then give an expression. Why not post the actual code itself? i.e. the definition as you have it in your notebook.
Jun
11
comment How to Normalise / Normalize eigenvectors?
They are all normalized so that the norm is 1 ! Try this k = {{300, 100}, {100, 200}}; m = {{4, 1.}, {1, 3}}; {lam, phi} = Eigensystem[{k, m}]; Norm[phi[[;; , #]]] & /@ Range[2] and you will get {1,1}
Jun
11
comment Is there an equivalent of Sum for And?
@DanielW it is time they added these functions ! they can be very useful.
Jun
11
comment Is there an equivalent of Sum for And?
related mathematica.stackexchange.com/questions/916/… "Are there “All” and “Any” functions in Mathematica?"
Jun
10
comment Assign a Distribution to a group of symbolic variable
I can not see the image well. it is too small. can you zoom it up or may be post actual Mathematica code?
Jun
9
comment Define the square of a function
You can't use ^2 in the function name (left side), it has to be in the right side of the definition. Use the method by Oska above.
Jun
6
comment Correct slot assignment when mapping from different lists using pure function
@Mr.Wizard all the answers were great and I +1 them all and would have accepted them all if I could. When all answers are good and I do not know which to accept, I normally accept the one which people have voted most to at the time. That is all. if there are two answers with same votes and both equally good, I flip a coin. Thanks again for your excellent answers as always.
Jun
4
comment Correct slot assignment when mapping from different lists using pure function
That is why I think the Function method was more clear. Arguments are defined using normal symbols, and in fixed location and position, so less chance of making a syntax error, and it looks more natural than using pure function with its # this and #1 that. I am trying to learn to use Function[...] more now than pure functions, even though it takes few more keystrokes to write it.
Jun
4
comment Correct slot assignment when mapping from different lists using pure function
ah! I was close. I was doing #1[[1]] all along for the first argument instead of just #1, since I also used #2[[...]] for the other argument! I did not notice [[...]] is not needed for the first one (now I know what the error meant :)
Jun
3
comment Row and Column Headings for a Grid
@eldo, I would not know how to do this. I also think making a simple function to fill-in the headers on the sides of the data is just simpler than what you suggest.
Jun
3
comment select from a list based on digits
You are right, I saw Mod there with 12 next to it. Need new glasses. Either way, smart method
Jun
3
comment select from a list based on digits
Nice math!. I did not think/know that mod 12 would pick all values that end up with 12 and nothing else. But I guess since these values are divisors, then it should follow.
Jun
2
comment select from a list based on digits
@george2079 opps, ok, easy to fix, thanks. will do that now.
Jun
2
comment saving outputs of loop
in such a way that i must be able to call the output of any iteration step in some other program I am having hard time understanding what this mean. May be MWE will help.
Jun
2
comment Output for $\LaTeX$
fyi, I get "an improperly formatted" message when running your code, windows 7, version 9.01 : !Mathematica graphics
Jun
2
comment How can I recover the source code from cdf file?
You should not open CDF in text editor. You can easily corrupt it. As Kuba said, the code should still be in the CDF. You might have a cell set as closed and it needs to be opened that is all. If you put the CDF file somewhere, someone might be able to help better.