2
votes
1answer
97 views

Plot a curve on a lattice

How do I plot a 2d curve and label lattice points to one side of it? I want to plot the curve $f[x]=\frac{1}{x}$, and draw a solid red dot at every lattice point in the following set: $$\{(m,n)\in ...
6
votes
2answers
59 views

Simplify expression to Integer

I have the following function: f[n_]:=(n-1) E Gamma[n,1]; I know that this expression always evaluates to an Integer, but Mathematica doesn't always output the ...
2
votes
1answer
44 views

Documentation for the Bounded option of SmoothKernelDistribution

I have found the Bounded option useful in the SmoothKernelDistribution function, but I can't find any documentation for exactly ...
2
votes
1answer
84 views

Some symbol does not auto-complete in v10.2

When I input Backsub in Mathematica 10.2 and press Ctrl+K after, I couldn't get Backsubstitution. My OS is Windows 8 32-bit. ...
1
vote
2answers
60 views

Convert a list of lists of rules to a list of values [closed]

I have a list of the following form: thisVeryExcitingList={{x->1},{x->2},{x->3}} I would like to convert it to the form ...
4
votes
0answers
116 views

CompilationTarget to C takes long compilation time

Consider I have a function, with one version that compiled to the virtual machine and one that compiled to C: ...
2
votes
1answer
49 views

Manipulating unevaluated expressions in nested function calls

This is a follow-up to my earlier question: Passing an unevaluated part of an association to a function I'm trying to create a modular dashboard that controls sound volume of an audio system ...
0
votes
1answer
36 views

Running an animation if a certain condition is met using Manipulate

I'm having trouble finding a way to play an animation (inside Manipulate) if a certain condition is met. I'm representing liquid volume with rectangles and if the ...
0
votes
0answers
29 views

Weighted graph vizualization [duplicate]

Is it possible to visualize a weighted graph, so lines on screen would reflect weight? I.e., be longer, or shorter depending on edge weight? Slight OT: which graph visualising libraries/tools can do ...
2
votes
0answers
45 views

Is FindRoot wrong about its WorkingPrecision?

I noticed an odd mismatch between the behaviors of NDSolve and FindRoot. If you give NDSolve an equation of a certain precision, say 20, and tell it to use a higher WorkingPrecision, say 30, it will ...
1
vote
0answers
20 views

Using Infinity with AutomaticUnits

I am using the AutomaticUnits package in Mathematica 10, and I am writing some unit checking functions. However, I run into a problem when I have an Infinity, since ...
3
votes
3answers
149 views

Move element inside a list

I need to change the position of a single element in a list. Example: I start with: {a,b,c,d,e,f} I want to move the a before ...
7
votes
1answer
80 views

How to compile procedural program effectively

Consider these four function in different form: ...
-1
votes
0answers
38 views

How to solve a certain PDE [closed]

I would like to find the solutions $C(x,r)$ and $V(x,r)$ of the following partial differential equation. with the boundary and initial conditions where a and ...
0
votes
0answers
17 views

How to get rid of numerical scope error? [duplicate]

I am trying to perform a numerical maximization routine on a setdelayed function which involves a numerical integral and I'm getting an error message. The evaluation continues and gives the right ...
12
votes
0answers
228 views

Why did Wolfram Research change their release policy? [closed]

As a long term user of Mathematica I cannot fail to notice that Wolfram Research seems to have changed their release policy considerably: https://en.wikipedia.org/wiki/Mathematica#Version_history ...
0
votes
1answer
129 views

How to solve constraint differential equations using If function

I have to solve a series of differential equations along with a constraint that has to be satisfied at each point of time where $t\in [0, 100]$ The model parameters are ...
1
vote
1answer
87 views

Problem fitting when some data is missing

I have a problem fitting a function to data, where I only have the falling and rising edges of the data, with the peak having been capped and was wondering if you have some tips. The data should have ...
11
votes
1answer
190 views

How to specify PDE Boundary condition on Bspline?

Context I would like to solve a PDE on a boundary which is parametrized as a BSpline. I am trying to solve the force-free Grad-Shafranov equation on a ...
11
votes
0answers
58 views

How to connect to EC2?

I have Mathematica 10.2 installed on an Ubuntu 14 machine in Amazon web services's elastic computer cloud. I have dido access and I'm connected to the instance though ssh on the terminal. I have an ...
2
votes
0answers
35 views

Approximate inverse of large sparse matrix with small diagonal element

I need to find inverse of a large sparse matrix with small diagonal element. I follow this question - Is there any way to obtain an approximate inverse for very large sparse matrices? and try to use ...
0
votes
1answer
49 views

Solving a differential equation with multiple coefficients [closed]

I have a syntax problem solving a differential equation in Mathematica (10th version). The input for the equation I need to solve is as follows: ...
0
votes
1answer
48 views

Element assignment in matrix function

I have to define a function of two variables that yields a high dimensional matrix, with each entry containing a scalar function, that uses its coordinates in the matrix as input. like this: ...
5
votes
1answer
100 views

VectorPlot only shows dots [duplicate]

I am trying to plot a electric field: vec = 1/(16 π ) Abs[{ex, ey, ez}]^2; ...
9
votes
0answers
65 views

MMA breaks down when `DSolve` -ing a third-order linear ODE

My code is: DSolve[y'''[x] + (x^3 + a^3) y[x] == 0, y[x], x] It should be noted that similar code not only meets the similar problem but also returns more ...
10
votes
2answers
228 views

Checking the argument of user-defined function with side-effect method

Today, I answered a question of mine that asked two month ago. Please see here Now I would like to add the argument checking in this function. Then I used a method that Mr.Wizard answered ...
3
votes
3answers
190 views

How to identify all rules that match pattern type? [duplicate]

I would like to be extend the below solution to be able to find get all rules from the list step[2] that match the generic pattern k_Digit_p. Where k and p are not ...
0
votes
0answers
46 views

Generating this type of Matrix

How I can generate a matrix of order $N$ if $N$ is odd then $$\left[ \begin{array}{cccccc} \frac{1}{0! 0! 2^0} & 0 & \frac{-1}{0! 1! 2^1} & \cdots & ...
0
votes
0answers
27 views

numerical integration takes so long? [closed]

to evaluate this line, Mathematica.10 takes more than 10h?!! Table[{x, (Re[ NIntegrate[f[x,y], {y, -x/a, x/a}, Method -> "UnitCubeRescaling"]])}, {x, 1, 200, 1}] where f[x,y] is a ...
3
votes
0answers
46 views

String option names for Cells

They seem to be correctly interpreted. I'm asking because of some minor reasons and a major one: NotebookWrite a Cell with WholeCellGroupOpener option I don't know any official confirmation so let ...
1
vote
0answers
42 views

How do I diagonalize a matrix? [closed]

How do I diagonalize the following matrix: ...
0
votes
0answers
39 views

InterpolatingPolynomial::poised error

When entering: ...
12
votes
1answer
282 views

How can we show the boundary of a WordCloud shape?

WordCloud can arrange the words inside a shape. ...
2
votes
1answer
44 views

How to insert a character in a string with condition?

Considering we have a string: str = "1a 789 4/7 123/7 asff %$#7 478 9/4" How can I insert "/1" for the numbers that are ...
0
votes
1answer
34 views

StringJoin Dynamic problem [duplicate]

My goal is to import a XML file from the site fueleconomy.gov to get a list of cars dependent on the year given as the user input . Here is the code: ...
0
votes
0answers
20 views

marking spontaneous in an Image and collect coordinates [duplicate]

How to mark spontaneous in an image and collect all the positions of marking. also then any example will be great aon land mark based registration Thanks
1
vote
0answers
21 views

Use functions to call a named object [duplicate]

Now I have several interpolation functions called x30, x50, z30, z50...... I wish to write a function to call these function by inputing x or z and numbers automatically, and assign a argument x to ...
0
votes
1answer
32 views

What is the best way to generate this power series expansion?

f[m_,z_] := (1/m)*Sum[Exp[z*Exp[2*Pi*I/m]^k], {k,0,m-1}] g[t_] := 1/(2-f[5,t^(1/5)]) Series[g[t], {t,0,10}] When I tried to compute this on Wolfram Programming ...
2
votes
2answers
87 views

Function with lazy and non-lazy arguments

Consider the function Z[entropy_, beta_] := Sum[E^(entropy[[i, 2]] - beta entropy[[i, 1]]) , {i, 1, Length[entropy]}] where entropy is a list of pairs (e.g. ...
0
votes
0answers
8 views

Proof for sum of divisor of a given range [migrated]

Question is like this: We are given a number "n"(n<=10^7) and we have to calculate G(n) which is G(n)=F(1)+F(2)+F(3)+F(4)+....F(n). where F(x) is the sum ...
-2
votes
0answers
52 views

Solving an integral equation using Mathematica [closed]

Hi I have the following problem I want to solve numerically by Mathematica the integral equation $$v(x,t)=1-0.0000065*\int_0^t \theta_0(1/2 x| i\pi \tau)v^4(1,t-\tau)d\tau$$ where $\theta_0(1/2 x | ...
0
votes
0answers
43 views

Optimal way to search for Fibonacci $≡−1 \pmod {p^2}$ [closed]

I came upon this question, and see a few people brute force searching for a prime $p>3$ such that the Fibonacci number $F_{np}≡−1 \pmod {p^2}$ for some natural number $n$ I was wondering how ...
-2
votes
0answers
45 views

problem in mathematica [duplicate]

Is there is any problem in Mathematica? Whenever I first time run the code it gives exact output but at the same time when I run it again it starts giving error. I evaluate the notebook whenever I run ...
0
votes
1answer
38 views

Combining Plot and ListPlot using appropriate colours [closed]

I have Plot and ListPlot and I want to combine the using Show: ...
1
vote
1answer
46 views

How to use EvenQ[] in patterns? [duplicate]

This works: (w[1] + w[2] + w[3]) /. w[s_] -> If[s == 2, w[s], 0] (* w[2] *) This doesn't: ...
3
votes
2answers
126 views

Finding the equation of a level curve

Is there a way in Mathematica to determine a parametric equation of a level curve in Mathematica. For example, consider: ...
1
vote
0answers
29 views

Kernel crash during numerical integral related to internet connection and WolframAutoUpdate

I am having silent kernel crashes whenever I attempt to evaluate a difficult 2D numerical integral. It is not consistently repeatable, in the sense that sometimes the same integral will evaluate ...
4
votes
1answer
271 views

How can I tell why Mathematica returns no solution to this system of nonlinear equations?

I'm trying to solve a system of 12 equations and 12 unknowns with the code below. ...
0
votes
0answers
50 views

Nesting a 2D Plane in a RegionPlot3D

So basically I am trying to project a 2D Region onto a 3D Region. Here is some code: ...
3
votes
2answers
68 views

Error control for NDSolve

I have a problem controlling the numerical error associated with the following non-linear ODE : ...

15 30 50 per page