8
votes
1answer
143 views

After modifying expression, new result doesn't replace old one

After I modify and re-evaluate an expression, the new result doesn't replace the old one. Rather, what happens is that the old result gets pushed down and Mathematica displays the current result at ...
4
votes
2answers
174 views

Using two color functions in a MatrixPlot

I'm trying to use two color functions within one MatrixPlot in Mathematica. Is it possible to do this? For example, using a very simple matrix: ...
6
votes
2answers
345 views

Sierpinski carpet with GraphData

Is this graph in the list among the so-called "standard" structures used in GraphData? However, I have not found, yet, anything like "Carpet" or "Sponge" in the ...
11
votes
4answers
192 views

Constraint syntax compaction

Is there a more compact way to represent these constraints: NMaximize[{a+b+c,...
4
votes
2answers
415 views

Mathematica not plotting whole logarithmic function

I am trying to use the following input Plot[Log[E,x+1],{x,-50,50},PlotRange->50] however the output is: How can I adjust it so the line goes down to ...
2
votes
3answers
128 views

Accessing temporary value of a Nest evaluation

The function Nest[] must store the temporary values in the memory somewhere (those values that would form the entries of the list which is returned by the ...
1
vote
3answers
198 views

Creating overlapped block matrices

I'm doing an FEM assignment using Mathematica. (EK1 = {{a11, a12}, {a21, a22}}) // MatrixForm (EK2 = {{b22, b23}, {b32, b33}}) // MatrixForm I don't know how ...
3
votes
1answer
342 views

Why this numerical integration takes so long?

Let me explain the problem. I am trying to integrate a one dimensional integral: $$\int {g\left( {{k_x}},parameter1,parameter2,...\right)d{\mkern 1mu} {k_x}} $$ for the sake of clarity, I will give ...
39
votes
1answer
871 views

How can I manipulate TemporalData?

Version 9 introduced TemporalData but, truth be told, the documentation doesn't suggest that one can do much with it. Many of us have probably assumed we'd be ...
0
votes
2answers
181 views

Solving Within InverseCDF

I have the following input data: Remove["Global`*"] x = 5/30 // N; y = 0.8; μ = 0.2; T = 5; ρ = 0.8; σ (*to be determined*) And this is the given equation: ...
0
votes
1answer
225 views

FindFit: why do I get negative value as result?

I am trying fo fit a model to data using FindFit. ...
0
votes
0answers
333 views

Metric Parameters such as Pratt Figure of Merit (Pratt-FOM) for Edge Detection

I have developed a new algorithm in Mathematica v9.0 for the Edge Detection and want to compare it with the existing Roberts, Sobel, Prewitt etc, operators in the presence of Noise. I have evaluated ...
6
votes
3answers
1k views

Simulate MATLAB's meshgrid function

Here is MATLAB's meshgrid. I came up with these implementations in Mathematica: ...
1
vote
1answer
349 views

How to compute the Multifractal Spectrum of a Financial Series with WTMM

I would like to know if someone knows how to compute the Multifractal Spectrum of a Financial Time Series (Currency) througth the Wavelet Transformation Modulus Maxima (WTMM). I would highly ...
4
votes
2answers
165 views

Automate mouse clicks with Mathematica

I need to automate mouse clicks with Mathematica. However, a similiar question was closed on this forum, without any answer. Consider the following steps: ...
0
votes
0answers
241 views

NDSolve for a large system of coupled (complex valued) ODEs

The system under consideration here is a generalization of the one I discussed in this problem. Qualitatively, I am trying to solve a system of coupled nonlinear (up to order 4 in the dep variables) ...
1
vote
2answers
262 views

How do I create matrices with arbitrary list restrictions?

I want to randomly generate a square matrix of dimension n with entries in the list StartingEntries, and also satisfying that for any such matrix M, the matrix Inverse[IdentityMatrix[n] - M] has ...
5
votes
1answer
209 views

Programmatic generation of enhanced (Enterprise) CDF

How does one PROGRAMATICALLY generate enhanced CDFs under an Enterprise license? Undocumented options to CDFDeploy[] perhaps?. Wizard works fine for me, but attempts to do this programatically (from ...
1
vote
2answers
332 views

Draw the image of a complex region

I'm working on a complex question that asks that I determine a function that maps the complement of the region $D=\{z:|z+1|\le 1\}\cup\{z: |z-1|\le 1\}$ onto the upper half plane. That is, $f$ must ...
8
votes
3answers
182 views

Preserve information in flattening a nested list

I have a series of lists in the form below: list={ {1,1} , {2,2}, {3,{3,1},{3,2},{31,{31,1},{32,2}}} } Its a nested list which the dimension is changing case to ...
2
votes
2answers
175 views

Time differences between code using user-defined probability distribution and code using built-in distribution

Why is the reponse time of of kernel significantly different when I use the first code rather than the second? Shouldn it not be the same? Is there any way that the response time can be made smaller ...
0
votes
1answer
79 views

Scope of expression in a user-defined function

I have the following code: fbasic = A + R + Z*Z *Z*Z; f[A_, Z_, R_] := fbasic + R; f[0, 2, 3] The answer I am getting is ...
9
votes
1answer
94 views

IntegerDigits has Listable attributes, but not fast

See this example, a function has Listable attributes often more efficient than Map,but why is this one is an exception? ...
4
votes
4answers
252 views

Elegant Matrix Combinations

Suppose you have a matrix (mxn), simplified for illustration m= {{a, b, c}, {d, e, f}} And a set of combinations (simplified for illustration purposes but can ...
0
votes
1answer
165 views

How to compute values only if input fields are filled?

In the following code how can I keep the DynamicModule from computing values if the input values are not all filled? If I don't specify default values it will show the code used to compute the values ...
3
votes
1answer
55 views

Button ImageSize x-dimension ignored

How can a small square button be created with ImageSize -> {20,20}? The x-dimension won't go below about 70. (Using version 9.0.1 on OS X.) ...
4
votes
1answer
244 views

Changing a wave simulation

I want to adjust some code that I found on this Wolfram Demonstration: http://demonstrations.wolfram.com/WaterRipplesPassingThroughASlit/ Basically it shows a wave passing through a single slit. I ...
0
votes
2answers
143 views

Compute percentages in a list

I have a data file which contains thousands of lines and each line has eight elements. Here is a small sample of the data file ...
-2
votes
2answers
193 views

Mathematica not assigning variable correctly

So I have been fiddling with this the last hour and I just can't get it to work. I have 3 matrices of the same size which contain nothing but 0's in a list, I also have 3 matrices of the same size ...
16
votes
6answers
867 views

Looking for a way to insert multiple elements into multiple positions simultaneously in a list

I would like to take the following data: insertvalues = {r, x}; insertpositions = {{1}, {5}}; origlist = {a, b, c, d, e, f, g}; and generate output that looks ...
0
votes
1answer
493 views

Reassign Functions for Graphic Representation [closed]

How might I construct a function of the form Rep[defs,code], graphic[code] and display[code] ...
5
votes
1answer
412 views

Clear and Unset doesn't free memory

Example: Try this example only if you have > 4G ram d = 2000; f[x_, y_, d_] = Sum[Subscript[a, i, j]*x^i*y^j, {i, 0, d - 1}, {j, 0, d - i}]; Then ...
7
votes
3answers
363 views

Identifying when two graphic objects overlap

I'm designing a small demonstration that helps to visualize the reason behind shaping an electrode that is used to probe a surface: ...
5
votes
1answer
422 views

Packing squares into a circle

I am currently trying to solve and understand a problem about packing the maximum of squares into a circle. What I am trying to do, is to calculate the maximum number of variable sized squares (with ...
1
vote
1answer
349 views

NSolve cannot solve system of equations in Mathematica

I have the following two equations: ...
1
vote
1answer
191 views

ListPlot under conditions Part II

I have a data file containing several columns and thousands lines of data. Below I present a small portion of it, in order to express my issue: ...
4
votes
4answers
251 views

Generate Non-Singular Matrix of $n*n$ dimension

I want to create a function that will make an $n*n$ matrix which is non-singular that will always retrieve the same matrix (meaning that the matrix will not be random each time). I tried using the ...
2
votes
1answer
250 views

How to get the coefficient list

polynomial=-x^4+2 b x^3+(b^2-c^2+2 c) x^2+(2 b c-2 c d) x+c^2-d^2 This is good CoefficientList[polynomial, x] But how to ...
0
votes
0answers
69 views

RSolve and “the given boundary conditions lead to an empty solution”

I am trying to solve the following recurrence relation: ...
12
votes
5answers
491 views

Filtering elements from a list that appear only once

I want to be able to select elements from a list that only appear once. I originally had this: Select[Table[Count[list, i], {i, list}], # == 1] But the issue is ...
12
votes
1answer
560 views

ListSurfacePlot3D generates ugly artifacts

I have a list of $\{x,y,z\}$ pairs representing points in $R^3$. For every unique value of $z$ there are many $\{x,y\}$ pairs defining a polygon/contour in that particular $z$-plane. My dataset looks ...
13
votes
2answers
392 views

Paste data into Mathematica with formatting

Select the following Mathematica code and paste it into a notebook. In Windows 7(Mathematica 8) the line breaks are not interpreted in the expression. In fact any data copipasted from stackexchange ...
2
votes
1answer
130 views

Match a sequence of integers

I would to match a pattern p1 = 0,0,1,0,0 to the elements in listA. The elements are a boolean sequence that may look like this ...
27
votes
3answers
339 views

What bug fixes can be implemented in init.m?

In comments on this question, Mr. Wizard suggested a community wiki to share the bug fixes/workarounds (or possibly other tricks) people load in their init.m. I ...
0
votes
0answers
31 views

Asynchronous evaluation of a button's action [duplicate]

What would be the best way to have the value of x update before the pause (or a similarly slow function) finishes executing? ...
7
votes
2answers
210 views

Using MatchQ (or other means) to parse an expression using sums of COS or SIN correctly

I am writing a function that will take an expression as input. I want to make sure the expression is valid first before processing it. Looking for a correct to use ...
0
votes
1answer
131 views

Defining functions with changing number of variables [duplicate]

I am working with a bunch of functions of the form fn[x1_,x2_,x3_,...,xn_] := x1x2+x2x3+...+xnx1 where $n$ changes. Is there a way to create these functions ...
7
votes
0answers
677 views

Resources on Mathematica and strong AI (a.k.a. AGI)

David Deutsch (physicist / quantum computing theorist) wrote an article for Aeon Magazine last year: On Artificial Intelligence that got me thinking. The article assesses and critiques the ...
6
votes
1answer
91 views

Error when putting ??symbol in a cell with another expression

Putting ??symbol in a cell and another expression in a different row of the cell returns the following error: ??symbol 1 + 2 ...
4
votes
4answers
221 views

How to avoid writing $K$ loops?

I want to evaluate a mathematical function of $K$ variables each of variables varying between 1:N. One way to do this is writing $K$ loops and varying variables accordingly, as shown below: ...

15 30 50 per page