# All Questions

4 views

### Why can't I import a file in the init.m file?

I would like to have some data read in every time the kernel starts, but it doesn't seem to work. Say I have a CSV file I want to have read in, for example I use: ...
10 views

### How do I display the parameter value in animate, similar to how it's done in manipulate?

When I use manipulate, there is a 'plus sign' in the top right that, if I click on, shows my parameter value. I used animate, because other posts suggested that it solved other issues I had, but now ...
27 views

### DumpsterDoofus's captivating generative art

How can I render these beautiful images that DumpsterDoofus posted?
14 views

### Changing the Ticks in LogLinearPlot for representation pH values

I need to change the ticks in the xaxis for representation pH values, but the ticks are not dispersed along the range of xaxis. Another question: why the vertical line defined with Epilog is not ...
6 views

### Changing variable value via loop [on hold]

Just a quick question, I have the following code: Do[{ Mtest = 2; Mtest = Mtest + 0.1; Print[Mtest] }, {n, 1, 5}] What I hope to do is have it loop 5 ...
15 views

### Is there a simple function identify the sign of an expression given constraints

I'm looking to find a simple function that can identify the sign of an expression given a set of constraints. I have looked around and do see that there is a few threads on this but I'm not sure I ...
19 views

### How to solve ArcSinh equation for many differents parameters?

I am totally stuck trying to solve the equation below (1/2) x Sqrt[1 + 4 a^2 x^2] + ArcSinh[2 a x]/(4 a) == d Where a and ...
64 views

### Over 30mins to generate the first eigenvector?

Is it normal for Mathematica to take over 30mins to try to compute the first eigenvector of a 100x100 matrix? The matrix is reasonably sparse - about 90% of the cells are 0s and each column sums to ...
20 views

### How to form a variable from matrix elements

I have matrix with n rows and 2 columns, say m = {{x11, y12}, {x21, y22}, ..., {xn1, yn2}. Now, I want to form three new variables for example: ...
23 views

### Pick out element from array [on hold]

I have the $3\times 3 \times 3$ array: ...
21 views

### How can i insert mathematica graph in eps format into word file without lossing a right vertical line? [on hold]

How can i insert mathematica graph in eps format into word file without lossing a right vertical line? if any one know please help me
35 views

### Can not understand the code to make person curve

I'm reading the CDF file from Making Formulas… for Everything in wolframalpha blog. When I step into In[9] and In[10], I'm fully confused. Who can tell me what does the two functions mean? The ...
19 views

...
26 views

### Improve on timing of NMinimize

I got a little performance problem with the function NMinimize (it takes mathematica approximately 10 minutes to compute the results). Here i s my sample code: ...
33 views

### Randomly changing matrix entries

1.Write a block of code that generates a 4x4 matrix with randomized real number entries each between 0 & 1, then selects 3 matrix entries at random, and finally replaces these 3 entries with a ...
15 views

### Nested For loop in Mathemaitca for solving FDM problem

I am solving a FDM problem in Mathematica My equation is d[Rho]/dt + beta*Rho= alpha*q dq/dt + v*dq/dx +alpha*q= beta*rho nx = nt = 5; ...
22 views

### Non linear model fit

I need to fit this, but for some reason I cannot... data = {{0.617,0.8}, {0.605,0.6}, {0.5997,0.4}, {0.5972,0.2}, {0.5985,0.1}}; soln = NonlinearModelFit[data, {y - 2478.82*wlog[kc + 1]}, {y,w,k}, ...
14 views

### Using FindFit to return a list of possible best fits

Can I use some variant of FindFit that will return a set of best fits, not just the best fit? It would be very useful if for example I had a list of "best fit" parameters, arranged by residuals.
16 views

### How can I get numerical answers to integrals involving the error function?

This is the integral I am trying to evaluate in mathematica: Integrate[Exp[-p^2/(m w h)], {p, -Infinity, Sqrt[h m w]}] Can someone show me how to get a numerical answer out of this?
21 views

### How to delete certain unwanted elements from an array

Suppose I have an array like so array1 = {{Null,2,3,4,5}, {a,b,c,Null,e}, {w,x,Null,y,z}} Is there some way to selectively remove any element I ...
83 views

### Command to take the first elements of a list that match a pattern

I want to find the number of elements in a list in a row that match a certain pattern. So for this list {1,1,1,1,0,0,0,1,1,1} It should return "4" because there ...
37 views

### Submatrix with linearly independent columns

What I want is the submatrix where all the linearly dependent rows have been eliminated. I tried implementing this solution, but it doesn't work in the following example: ...
41 views

### Trying to get plots to work AGAIN

OK, I have asked stuff here before. I am probably driving people crazy but this is making me angry and frustrated. And yes, I bet this is some simple syntax thing but I can't figure it out and I am at ...
54 views

### Showing the coordinates on a plot in TraditionalForm

I just want to show the coordinates (Log[y/x],Log[x/y]) of a point on a Graphics object, but TraditionalForm fails to convert ...
78 views

### Why is B /. h -> #2 & not a pure function?

I am trying to plot the energy surface of the mean field Ising model, but I am running into a problem with setting the MeshFunctions for the plot. ...
46 views

### Hilbert transform of density of states [on hold]

I am trying to evaluate analytical integration over density of states, for example G(Z)=int[f(x)/z-x,{x,x1,x2}] , where ...
40 views

### How should I provide Dataset slot names in function definitions? [on hold]

Say I have a Dataset like the following: ...
33 views

### ColorFunction - custom colors and scaling

I am trying to implement my own colors and scaling into the ColorFunction which I use in ListDensityPlot. I have several lists of 2D values which I plot in multiple images and I want to scale the data ...
38 views

### Optimization in MMA for time resolved spectroscopy

I want to fit some spectroscopic data with a model. I detect the fluorescence of something over different wavelengths. The detection over each wavelength is one data set in time. The lifetimes of ...
40 views

### How to display a list using numerical values? [duplicate]

Suppose I compute the eigenvectors of a matrix like this Eigenvectors [{{3, 2, 3, 1}, {2, 3, 1, 1}, {0, 0, 2, 1}, {2, 3, 2, 1}}] The result I get looks like: ...
31 views

### how do I multiply two arrays in Javascript? [on hold]

I want to multiply two arrays, as in element per element: [1,2,3,4,5] * [2,3,4,5,6] = [2,6,12,25,30] I am new to JS and just have no clue... Thanks, Pam
33 views

### Multiway Systems Rules List Management

I'm working with a multiway system and I have a number of different mutation rule lists. I need an efficient way of managing which rule lists I apply. Here is the basic multiway system code that I'm ...
21 views

### ErrorListPlot Not Plotting

I'm on Mathematica 6.0, it's the copy my school gave me for a lab course. ErrorListPlot produces a graph, but there is nothing on it. I have checked the table constructed using ErrorBar and it's good. ...
63 views

### How to do algebra on unsolved integrals?

I am working with functions calculated from a set of general basis functions. ...
36 views

### How to append data in an already existing data .txt file in newline or in tab separtion?

Say I have an already existing .txt file containing data in the following format. $a \qquad b$ Now at different times I will successively have data like ...
32 views

### Understanding TransformedDistribution behavior on two similar lines of code

The two following lines of code does not give the same output. Mathematica manages to calculate the first one but fails to calculate the second one. ...
32 views

### How to get grid items with a gradient background to behave well?

I have a table that looks something like this ...
101 views

### Compute the average distance from the base of a rectangular pyramid to its apex

How can I compute the average distance from the base of a rectangular pyramid to its apex? For example, if the base of the pyramid is 30 feet by 8 feet, and the height of the pyramid is 12 feet, then ...
48 views

### Usage of @ symbol in Mathematica [duplicate]

What is the purpose of @ symbol? Also, I would appreciate if somebody could provide a webpage where such functional special symbols are documented
108 views

### Symbolic combinations

If I have 3 lists: {a,a},{b,b},{c,c}, then the desired output is ...
355 views

### Phase portrait on a cylinder

It is very nice and very easy to make a sketch of a phase portrait with StreamPlot. For example, for the classical pendulum, defined by $$\dot x=y,\\ \dot y=-\sin x,$$ The code ...
211 views

### Quick way to tell if matrix is integer-only?

What's the most shortest one-liner code to tell whether a matrix is integer-only? I've come up with: Length@Cases[A // Flatten, _?(Not@*IntegerQ)] == 0 but ...
47 views

### Include more padding between tick marks and plot [duplicate]

How can I modify the code below to add some padding between my tick marks and 3D plot? It is not a problem in this example, but often my tick marks collide with my axes. ...
46 views

### Clustering image data by intensity and position

I'd like to apply FindClusters or ClusteringComponents to image data of an indistinct edge, with the goal of segmenting the ...
42 views

### Temporary variable not removed in Mathematica 10

In Mathematica 10, the documentation still states that a symbol with attribute Temporary will automatically be removed when it is no longer needed. Now consider ...
31 views

### Exporting mixed data of matrices and vectors / lists

thank you for reading my question. I have a problem trying to export mixed data from Mathematica. I have different matrices and vectors, which should be combined to a output file. Here a ...
38 views

### How to get data from DB into dataset with keys

I'm a Mathematica newbie and I have the following problem: I connect to a Oracle DB and read out a set of variables, further on I want to histogram some of the variables. A Dataset seems to be the ...
73 views

### How to separate factors by dependent variables (arguments)?

How can I separate factors in an expression by their dependent variables? For example: expr = b * c[2] * a[x] * 2 * x^2 * g[x,y] * z[r] * D[q[x], {x, 4}]; I ...