1
vote
1answer
281 views

Concerning ShowLegend in Mathematica

I found a code for Mie Scattering from 2007, written for Mathematica. I have edited it quite a bit, since there are package definitions that we don't need, etc. But I am having difficulties ...
4
votes
0answers
327 views

When using NMinimize[…,Method->“DifferentialEvolution”] is an “iteration” different than a “step”?

Hopefully this question has a simple answer. I have the following bit of code: ...
1
vote
1answer
213 views

How do I operate on a set of ordered pairs? [closed]

I have a calculation that will give me a lot of ordered pairs. For each such pair in a list, I want to square the elements and add them together. Here is an example of the kind of list I have ...
1
vote
0answers
309 views

Solving homogeneous Fredholm Equation of the second kind

I am trying to solve a homogeneous Fredholm integral equation of the second kind, i.e. $\lambda y(x) = \int\limits_a^b e^{i[\phi(t)+k(t-x/M)^2]} y(t)\,dt$ where $\lambda$ is the eigenvalue (to be ...
3
votes
0answers
141 views

Mathlink and multithreading

In order to make my computations faster I have developed a C/C++ application calling Mathematica kernel and performing many operations using Mathematica functions for equation solving. Now I want to ...
3
votes
1answer
562 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
2answers
202 views

How to replace Do loops by Inner

I need to replace Do loops by something else because it takes forever with big programs. I have been hinted towards Inner, but ...
2
votes
2answers
152 views

Substitution to write out powers of expressions

I am looking for a substitution command which will write out powers of expressions like this: $$\frac{a ~b^3~ c}{d~ e^{3/2}~ f^2}\to \frac{a ~b~b~b~ c}{d~ e^{1/2}~ e^{1/2}~ e^{1/2}~ f~f}$$ ...
5
votes
2answers
636 views

How to deal with zero in NDSolve in mathematica?

I would like to solve the following ODEs $$\begin{cases} x'(t)&=y\\ y'(t)&=-y(t)/t-e^{x(t)},\\ x(0)&=1,\\y(0)&=0, \end{cases}$$ (EDIT : The second equation used to be $y'(t) = ...
0
votes
1answer
454 views

Add a sub-matrix of zeros in big matrix [duplicate]

I have a matrix of size $24\times24$ composed by 8 $3\times3$ submatrices in a diagonal way. I want to add a matrices of zeros ($3\times3$) between the sub-matrices, so the final matrix would be of ...
13
votes
1answer
581 views

What is $ sign in Mathematica?

Is it a special sign or it can be used as anything else? For creating variables for example. $x=4
31
votes
2answers
898 views

Variable naming changes everything

I am having a rather unusual problem I do not understand with Mathematica where renaming one of the variables of my function causes the function to stop "working". Here is the example of the code ...
1
vote
1answer
199 views

How to store a SparseArray? [duplicate]

How to Export/Write a SparseArray? How to Import/Read a SparseArray? Is it always stored as a normal array? How can it be stored in a dense form? Is a numerical SparseArray different to Export/Import ...
2
votes
3answers
989 views

Saddle Point in Matrix

Here is the Problem how to find out the Saddle Point inside Matrix. m = {{9, 3, 1, 8, 0}, {6, 5, 4, 6, 7}, {2, 4, 4, 3, 8}, {5, 6, 2, 2, 1}}
4
votes
4answers
958 views

How to plot filling under a curve?

I want to mark critical areas for statistical test on the plot. How can I do this? This: ...
3
votes
0answers
127 views

Is this result wrong because of calculation time? (and more questions about Assumptions)

I am confused with the Integrate Given by Mathematica. First let's see a one-dimensional case: ...
4
votes
1answer
115 views

WSMSetValues function

I am trying to assign values to some model parameters using WSMSetValues function, however, it seems to be working only with values greater than 10^-4. Is this normal behavior or I am doing something ...
2
votes
1answer
367 views

Getting MemoryAllocationFailure from NIntegrate

When numerically calculating a double integral using NIntegrate over an infinite domain (with all options at their default), Mathematica 7 calculates my integral ...
2
votes
0answers
39 views

NIntegrate/NSum with parameters [duplicate]

I'm trying to calculate a continuous integral within a discrete integral. Something similar to this (yet more complex): ...
1
vote
3answers
307 views

Scaling the x-axis in ListLogLogPlot[] or ListLogPlot[] in lieu of DataRange

I will present my existing workaround but I am wondering if there is a better solution that takes less time (my solution seems to ~double the time it takes to produce the desired plot). Using ...
1
vote
1answer
369 views

NDSolve diffusion equation over/underdetermined

I have a feeling the solution to my problem is very simple… but my knowledge of differential equations is pretty weak. I am trying to solve a scalar diffusion equation (used in NMR spectroscopy, but ...
2
votes
1answer
296 views
1
vote
1answer
99 views

Given a list of date and value pairs, efficiently sum the values by date

I have a list of date & value pairs. There can be multiple entries for each day. Sample data can be generated with the following: ...
0
votes
0answers
31 views

Expressions like <<1>> [duplicate]

In a function where I call the Maximize function, I am getting an error that says ...
0
votes
1answer
211 views

DAE - varying initial conditions

I want to solve a DAE-system and I want to vary more than one initial conditions and to manipulate them. I looked here: Putting NDSolve into ParametricPlot But it does not work: ...
6
votes
1answer
162 views

Importing images from the web using ImportString & URLFetch

I can bring images from the web using the Import command like this: Import["http://blog.wolfram.com/wp-content/uploads/2008/06/se-30.jpg"] Sometimes the web ...
3
votes
0answers
138 views

I am missing a function like HoldPattern

Temporary message: I am planning to edit this question, making the examples less confusing and by moving the things that are confusing to a separate question For any confusion about expressions that ...
0
votes
1answer
193 views

Integrate of Heaviside Function returns an error answer

I try to evaluate an Integral of a Heaviside function, but it turns out with an erroneous output(zero). Here is my integral: ...
1
vote
2answers
398 views

Reversing the ColorScheme used in an ArrayPlot and setting the font size in the color bar

I have a matrix of data that I am plotting via ArrayPlot. ...
32
votes
1answer
935 views

Finding areas of beings in microscopic image

I've got lots of images of diatoms. I need to get a list of their equivalent radii. It's not crucial to get them all, as long as those missed don't mess with the radius distribution (as would ...
7
votes
3answers
271 views

Making large tables easy to read with frozen headings and scrollbars [duplicate]

I would like to represent a table containing a large amount of information in such a way that I can (a) use scrollbars and (b) have table headings that don't scroll off the screen [just like the Free ...
20
votes
3answers
555 views

Common subexpression from two expressions

I am working with some unpleasantly tedious polynomials, which need to be manipulated in various ways (integrate with respect to some variable, differentiate with respect to another). Since these ...
1
vote
1answer
136 views

How can I change the Graph required data such as EdgeWeight,VertexWeight,EdgeCapacity,VertexCapacity in the Graph?

I asked this question in different form and because I couldn't receive the proper answer so I have to change my question.I know that was my fault sorry.I need to change the Matrix Data of nodes and ...
2
votes
0answers
140 views

Exporting plots

I want to export a plot which includes curve fitted to a multiple data set. shortly ( I use autolegend function Here ) ...
1
vote
3answers
619 views

The plot of roots of polynomials

I have polynomial equation like Tribonacci Polynomials for example: $T_3(x)=x^4+x$. After finding the roots of this polynomial, I want to show these roots in the complex plane. I have tried lots of ...
0
votes
1answer
196 views

Table of Polynomials [closed]

I made a function makePolynomial that creates a random Polynomial of a certain degree, e.g. 2+T+3T^2+8T^3-5T^4... now I ...
7
votes
0answers
347 views
+50

Symbolic integration in real domain only ( assumptions and ComplexExpand don't work)

Integrate[m^2/((x - m^2)^2 + y^2), m] mathematica gives me a complex-valued reuslt, but maple 17 gives me what I want. I tried using assumptions, but it doesn't ...
1
vote
1answer
188 views

Safe values of $\mu$ and $\sigma$ when randomly sampling from a Log-Normal Distribution?

I believe I'm obtaining overflow errors when randomly sampling from a log-normal distribution with the command: RandomVariate[LogNormalDistribution[μ, σ], 1] ...
1
vote
1answer
321 views

Computing Correlations and p-values

I have two vectors $A$ and $B$ of length (say) $50$ or so, and I want to determine whether there is any correlation between their entries. I computed their correlation directly and found it to be ...
0
votes
1answer
108 views

Taking derivative of Euler relation [closed]

I have defined the following function, which is the Euler relation for $\cos\,x$. f[x_] := 1/2*(Exp[I*k*x] + Exp[-I*k*x ] ) I want to take the derivative with ...
5
votes
2answers
337 views

Simplify — is this simplest result Mathematica can provide?

I have a question about Simplify: When I do a simplification the returned result is not as simple as I want. When I ask for the Norm of an complex expression, ...
9
votes
2answers
417 views

Simple problem with Manipulate and Plot

Would anyone have an idea why the following doesn't work: rule = {z -> x^2 + 2 x + y}; Manipulate[ Plot[z /. rule, {x, 0, 10}], {{y, 2, "y"}, 1, 5} ] But ...
1
vote
3answers
199 views

How to collect/reduce with respect to multiple variables?

I have this code: a == b + c + d - e Is it possible to collect or reduce this expression into this: c + d == a + e - b ...
1
vote
1answer
236 views

Not getting anti-aliasing with BarChart3D [duplicate]

When I put Antialiasing -> True in a BarChart3D, it doesn't work. Here is the code. ...
15
votes
2answers
1k views

Visualizing vector spherical harmonics

I have painstakingly derived the vector-spherical harmonics $\mathbf{V}_{J,\,M}^\ell(\theta, \phi)$, which are the generalization of ordinary spherical harmonics $Y_\ell^m(\theta, \phi)$ to vector ...
9
votes
0answers
142 views

Compile not correctly initializing a variable defined inside Module

In the following example, inside the minimumX's Module, x is initialized to 1, but the ...
11
votes
2answers
278 views

Where to begin? [duplicate]

I was looking at the Mathematica website today and just decided to buy the software. I've spent too much time juggling annoying symbolic expressions by hand that actually learning to do things with a ...
4
votes
2answers
177 views

Numerical sum does not give consistent results

Consider the function ...
4
votes
2answers
498 views

rotating 3d text

Is it possible to create a 3d rotating text like this: animation here. Here is my try so far: ...
0
votes
0answers
58 views

LogLinearPlot analog for Plot3D? [duplicate]

Is it possible to make 3D plot in logarithmic coordinates? I need analog LogLinearPlot to plot 3D figure in logarithmic x, or y, or both coordinates.

15 30 50 per page