All Questions

3
votes
1answer
354 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 ...
0
votes
0answers
343 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 ...
1
vote
2answers
264 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 ...
0
votes
0answers
122 views

How to define delayed coupon payment for FinancialBond?

When the coupon calculation end date falls on a holiday, it is customary to delay the coupon payment to the next working day. E.g. a bond may have a monthly coupon calculation period of 2013 Jul 18 to ...
4
votes
2answers
166 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
255 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) ...
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 ...
0
votes
1answer
169 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 ...
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 ...
7
votes
1answer
154 views

Why does Mathematica not simplify the Gudermannian function?

The Gudermannian function is built into Mathematica, but does not reduce to simpler terms in some simple cases. In particular, the Gudermannian is an odd function of real arguments but Mathematica ...
5
votes
2answers
632 views

Possible to evaluate only selected cells?

Is it possible to evaluate only the selected cells programmatically that I am interested in? Say in current cell to bottom of the notebook, instead of evaluate notebook or cells?
2
votes
2answers
176 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 ...
7
votes
3answers
366 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: ...
9
votes
1answer
95 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? ...
3
votes
1answer
311 views

Incorporating an additional graphics element when using Animate and ParametricPlot3D

I'm trying to animate some curves that wrap around a cylinder. OK so far: ...
5
votes
1answer
461 views

symbolic integration of a definite integral, how to speed up

I am wondering what are the general tips & hints for speeding up symbolic integration. As far as I understand, it solely depends on the form a function is represented before it is processed by ...
4
votes
1answer
247 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
145 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 ...
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.) ...
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: ...
26
votes
2answers
3k views

How does Interpolation really work?

I'm looking for some explanation or advice, not help in solving something. Recently I finished my program and my supervisor said "Ok, now it's time for your first paper: write a scientific text about ...
12
votes
5answers
496 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 ...
0
votes
1answer
159 views

Mathematica .m file can not open in Ubuntu

My operating system is Ubuntu. I add some new .m file to /usr/local/Wolfram/Mathematica/9.0/AddOns/Packages/ and then call for it in Mathematica, but failed with the message Get::noopen: "Cannot open ...
5
votes
1answer
424 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 ...
1
vote
1answer
91 views

Techniques To AutoReplace Browse

Let's say I have a function of the form. Test[File_,text_] What would be the most automated way and flexible way to generate an input cell of the form, such ...
1
vote
1answer
359 views
9
votes
1answer
744 views

Changing default window appearance

Since every single time I start Mathematica, my first action is aligning the windows properly (Notebook on the left for $2/3$ of the screen, help on the right for the other $1/3$), I was wondering ...
1
vote
1answer
498 views

ItoProcess function

While looking in the help manual of Mathematica concerning the ItoProcess function I found the following: ItoProcess[{a,b,c},x,t]: represents an Ito Process y(t)=c(t,x(t)), where ...
6
votes
1answer
181 views

Unable to save changes in Option Inspector from one session to another for the Documentation Center

I wanted to change the global option "WindowsSize" to the "large" value using the Option Inspector. It works well for the current session. But then I realize the "Apply" button was greyed and not ...
3
votes
3answers
148 views

HoldForm: how does it interact with nested evaluations?

Here's an example to illustrate the issue I'm having. right = 8 - y; left = y^2 + 6; integrand = HoldForm[Evaluate[right]] - HoldForm[Evaluate[left]] (I ...
4
votes
4answers
254 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 ...
0
votes
0answers
71 views

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

I am trying to solve the following recurrence relation: ...
2
votes
1answer
255 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 ...
2
votes
1answer
131 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 ...
7
votes
2answers
256 views

How to replace a variable that was assigned a value before

Question How to make the replacement $f[x] \to f[y]$ for an abitrary function $f$ if $x$ was assigned a value before? Example 1 How can I make the replacement $x +1 \to y + 1$ if I have assigned ...
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: ...
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? ...
1
vote
1answer
112 views

What is the best way to produce a symmetric semi-definite matrix using as few variables as possible?

As we know, there are only $\frac{n(n+1)}{2}$ variables in a symmetric $n$-dimensional semi-definite matrix. Is it possible to produce a $n$-dimensional semi-definite matrix whose trace is $1$ using ...
0
votes
1answer
133 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 ...
14
votes
4answers
769 views

Measure perimeter of black edge in Mathematica

I have a pattern like the one below. How could I measure the total length of the perimeter of the black/white edge? This would give me a measure of spatial frequency. Any tips would be great! Thanks! ...
1
vote
2answers
258 views

Error using Solve on Matrix Multiplication

I am trying to make a function the will find that value of $x$ in the following equation: $x.a=b$ all values of $x, a, b$ are matrices. The dimensions of $x$ are unknown, but $a$ and $b$ have the ...
1
vote
1answer
135 views

Double integral 0

I am trying to reproduce the results from a paper in Mathematica. This task involves $K$ double integrals of the form $$\int f(x,y)g(x)dx,$$ where $f(x,y)$ is a bivariate normal density with mean ...
3
votes
1answer
684 views

White noise $\eta(t)$

How to make a random function $\eta(t)$ to insert in a differential equation for NDSolve? Edit: example: to solve equations like $\frac{dx}{dt}=\eta(t)$
3
votes
4answers
220 views

Descriptive statistics of two events

I am trying to use the descriptive statistics feature of Mathematica to answer the following question: suppose I have two events, A and B, whose occurrence is described by a normal distribution around ...
3
votes
1answer
186 views

How to see a long output expression

I often run into long expressions in the process of solving equations. To go forward I need to be able to eye-ball the expressions to make some substitutions or use some existing relations I know to ...
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 ...
-1
votes
1answer
261 views

Help in NIntegration Methods - Takes too long, why?

I have this code. It is a triple integral, and using the automatic method gives me a wrong answer for $T=0.1$ (the correct answer is $5.44$, while I got $3.73$ ). I've tried to change the integral ...
10
votes
3answers
495 views

How to properly project a Graphics object consisting of line primitives

My problem starts from attempts at depicting overlapping lines of different thickness, i.e. ...
2
votes
2answers
88 views

How to interpret and show an input number with the amount of significant digits given?

what can I do to have Mathematica intepret and show a number with exactly the amount of digits I gave as an input? I have a larger talbe with numbers (text file, whitespace seperated) which are ...

15 30 50 per page