25,057 reputation
13685
bio website
location
age
visits member for 3 years
seen 6 mins ago

Apr
23
revised How do I count a number of primes(say smaller than N) that does not contain 5?
deleted 8 characters in body
Apr
23
revised How do I count a number of primes(say smaller than N) that does not contain 5?
deleted 8 characters in body
Apr
23
answered How do I count a number of primes(say smaller than N) that does not contain 5?
Apr
22
comment ListPlot, PlotMarker -> y value
you mean like this? (change your plot marker with) PlotMarkers -> m[[1, i]]] there is was value associated with the symbol valueY you had. m = {{33, 11, 2}, {3, 5, 4}, {6, 4, 8}} Table[ ListLinePlot[m[[i, All]], PlotLabel -> i, PlotMarkers -> m[[1, i]]], {i, 3}]
Apr
22
revised Numeric function not fully evaluating
clean code
Apr
22
comment How to determine three last bindings made to a variable when evaluating an expression?
Make a class that represents the variable (as say with Java's Integer class), with private array that keeps track of all assignments/time stamp/counters, etc.. all hidden inside the class, Supply a set[] and get[] methods to the clients of your variable to use on the variable once it is instantiated. Making such Class in M is very easy. Make a Module, and inside the Module create the local variables and private methods. see mathematica.stackexchange.com/questions/586/… for one example.
Apr
22
comment Numeric function not fully evaluating
Just move the a from the Block to gobal. You are using a in h[t] but h[t] does not see it. screen shot: !Mathematica graphics I do not know where the e you show came from. I do not see this on my end.
Apr
20
comment How to solve this integral equation?
The problem I think is that you have a pole, when s=c x even though x is unknown, it has to be between -Infinity and +infinitym right? So somewhere along the real line, is a pole. So does not converge
Apr
20
comment Issue with Set function
I can't follow your code, too advanced for me. But when I wanted once to index by column and give it a tag/name, I simply made few costants, like this: NAME=1;DATE=2;. then for matrix say m={{"joe doe","1/1/2001"},{"joe doe 2","1/1/2002"}}, I would write m[[All,NAME]] and m[[2,DATE]] and so on. it works and was easy to handle. Not as nice as dictionary ofcourse. Just had to remember to make sure the names of columns and the index matched what I wanted.
Apr
20
comment TableDirection in TableForm
It just means m = {{a, b}, {c, d}, {e, f}}; {dim1, dim2} = Dimensions[m] gives {3, 2} which is 3 rows and 2 columns. The docs used outermost since 2 is the last entry in the dimensions? The dimensions are row first, then cols second. So in a sense, column is the outer. I would not really pay big attention to these terminolgies used. As long as you know how to use it. I can't understand half the documentation most of the time. I just figure what to do by trial and error then I understand how to use.
Apr
20
comment TableDirection in TableForm
if m is your list {{a, b}, {c, d}, {e, f}}, then {a,b} is the first row, right? and {c,d} is the second row, and {e,f} is the third. So by default, TableForm, prints each row in a new line. That is what you see in the first example. The second example is just this: TableForm[Transpose@m] so it just prints each column on a new line.
Apr
19
comment Inhomogeneous phase-portrait with StreamPlot
I do understand your Matlab code here: You write f=@(t,Y) [Y(2); -1/2*Y(1)*(1000-1250/sqrt(1+625*Y(1)^2))]; but where is t in the RHS of the function f? Why are you defining f to accept (t,y) when t is not used in the function body? as for the main issue, I think one needs to understand your matlab code more to make sure what you are doing there and in Mathematica are mathematically equivalent. Having the Matlab code there helps.
Apr
19
comment Inhomogeneous phase-portrait with StreamPlot
Can you please post the matlab code also? You can have an error in the translation.
Apr
19
comment Inhomogeneous phase-portrait with StreamPlot
a must-be simple streamplot. what does a simple streamplot mean? do you have an example of what the output is supposed to be from your book to compare? or explain more what is wrong with this. You need more lines? Scale is off? etc...
Apr
19
comment How to switch elements i,j in a list?
If you do not want to type the reverse list, you can try m = {1, 4, 3, 2, 5}; idx = {1, 2, 4}; m[[idx]] = m[[Reverse[idx]]]; I also do not know why you need to save the actual data in the position affected. You have the index of the positions switched there. So you can always obtain the data that was switched anytime. Save memory ! Just do oldData = m[[Reverse[idx]]] to read the old data
Apr
18
reviewed Approve Few quick Mathematica questions about Dictionary
Apr
18
revised Removing a ProgessIndicator when no longer needed
typo
Apr
14
revised Integrating a half-normal pdf
add note
Apr
14
answered Integrating a half-normal pdf
Apr
14
revised Testing the Erdos square free conjecture
added 106 characters in body