# All Questions

120 views

### Can code optimize code?

Are there functions, programs or packages that deal with optimizing mathematica code i.e. re-writing ineffecive or convoluted code. -This question has haunted me since I joined SE. The background for ...
39 views

### Ivar error with Fit inside Plot

I'm trying to plot this Plot[Fit[med,{1,x},x],{x,0,10}] Why this doesn't work? I find out that if I do ...
53 views

### What methods does Solve use?

Could you tell me which method that Solve applies to solve linear and polynomials equations?
94 views

### NDSolve solution violates initial conditions

I have the following code: ...
164 views

### How can I only draw outer common tangent to two circles?

I have code worked for drawing common tangent lines to two circles(http://en.wikipedia.org/wiki/Tangent_lines_to_circles), now I want to delete the inner common tangent lines, how? ...
129 views

### How to find the positive region of this function?

I'm new-ish to Mathematica and I'm using it to learn the basics of derivative trading (for fun not for trading!). I've defined a simple function to calculate the pay off of a trading on a call. I have ...
23 views

### What is the common term of this series? [closed]

Consider the following series of numbers . 3,5,17,257,65537 What is the common term of this series? (n is a positive integer)
129 views

### Plot failing over set domain with any functions

I'm here with a rather interesting problem which I have no clue how to fix. I am trying to plot a function: Plot[x && 0 <= x <= (1/8), {x,-9,9}] ...
61 views

### ToExpression from commandline [duplicate]

I like to use Mathematica 8.0 from the commandline, then I just have to SSH in, no matter where I am, and go. I also like to do this without forwarding X, because that is slow and lags on my ...
100 views

### Is there a built-in function to map a list of heads to a list of data?

Assume that this built-in function is called func. What I want is func[{f,g},{a,b,c}] will return the following result: ...
24 views

### Sinchronicity and probability [closed]

"Synchronicity is the experience of two or more events as meaningfully related, where they are unlikely to be causally related. The subject sees it as a meaningful coincidence." Wikipedia First, I am ...
133 views

### What are the best tips in Michael Trott's beer/whiskey Wolfram Blog post? [closed]

Michael Trott posted this incredible tour-de-force on the wolfram blog: http://blog.wolfram.com/2014/08/19/which-is-closer-local-beer-or-local-whiskey/ The length of the post is overwhelming, so I'm ...
99 views

### How to graph the revolution of solid limited by 2 points in x axis [duplicate]

I'm learning how use this program. And I have problem with how graph the solid of revolution.Here i write one exercise. y=2-1/2x, y=0,x=1,x=2; about the x-axis. This is the graph also the volume ...
76 views

### Problem with machine number precision in compiled functions

When I compile a very big function and give it input the function returns error. I realized that this is because the value of the function becomes smaller than the smallest machine number. Is it ...
48 views

### Part specification error only in LogPlot

I've a problem. I defined a simple list and a function like below: lst := {5, 10, 20} f[m_] := lst[[Floor[m/10]]]; and drew a plot ...
75 views

### Formula for a 15 - Puzzle game (Backwards and forward solution) [closed]

So I currently code a 15-Puzzle Game. Every tile has position starting between 1 and 16. For example has a tile which is at the position where number 3 should be the position 3. Now I need to find ...
88 views

### Dependency injection - use a specific implementation of one function within another

Consider... f[x_]:=Body containing h[some args]... g[x_]:=Body containing h[some args]... However I want to define something like... ...
105 views

### Find file names in directory

I am trying to find the list of any file in any directory of a given name (by in the directory, I mean directly in the directory, so in a directory which is in the directory would not count). For the ...
318 views

### How to generate random points in a region?

The Mathematica 10 documentation was updated for FindInstance adding support for regions. In my use case I'm trying to sample points in a set of disks: ...
90 views

### Bad fonts in Mathematica 10

In Mathematica V10, the glyphs for mathematical and/or other special symbols are wrong. I see this in input cells and also in the Basic Math Assistant palette. How do I solve this problem?
111 views

### Help with coding triangular nodes/elements

I'm trying to write a program where it will shoot out the triangle node numbers. For example, in the picture, if we choose to divide this triangle by 5 points, then the program will return out the ...
53 views

### Importing multiple images for machine learning classification

I want to create a ML classifier using images just like this example. I have two classes of images in two different folders. Is there an easier way to import all images from both folders rather than ...
52 views

84 views

### Expectation of a composite Markov-Gamma distribution

In a model I have a discrete two-state first order Markov process, defined by a (2x2) transition matrix with two free parameters. If the first state occurs then the process outputs zero for that ...