0
votes
0answers
4 views

How to check empty tables using SQL Select or Execute?

If[SQLExecute[con, "Select * from TABLE"] == "{}", Print["TRUE"], Print["FALSE"]] I need to know the way, if the TABLE is empty or not
0
votes
1answer
68 views

Integration of linked PDFs over probability simplex

I'm trying to integrate the following expression: f[a1,p1+p2+p3+p4]*f[a2,p2+p3+p4]*f[a3,p3+p4]*f[a4,p4] Where ...
2
votes
0answers
34 views

How to speed up this code (simple but slow case)

The evaluation speed of Mathematica often persecuted me. It occurred again when I wrote a code to solve Project Euler. https://projecteuler.net/problem=206 Here's my code: ...
0
votes
0answers
7 views

What's the best way of visualizing a graph with certain vertices fixed along a timeline X axis?

What is the best way to create a graph such as the one below: Note that some (but not all) of the vertices should be aligned with the points on the reference X axis. BTW, these points may be, but do ...
0
votes
0answers
6 views

A warning in Mathematica 10 but not 9 about $MinPrecision

If we change $MinPrecision before run ListPlot[{{1, 2}}], there will be a warning in Mathematica 10. But there is no warning in ...
2
votes
2answers
24 views

Extract data from NDSolveValue result

Okay this is a very newbie question. I have coded a sample problem that solves the heat diffusion equation on an annulus. Here's what I have: ...
4
votes
3answers
106 views

How to Nest a Function with three Arguments?

I have two functions with three arguments $f_x(a,b,t)$ and $f_y(a,b,t)$. And i need a nesting like this ...
0
votes
0answers
8 views

Deployment to the Cloud not working

I am really trying to get my head around Cloud Deployment and Programming cloud, and the more I use it, the more I think it is a fantastic product. At least in principle. I successfully deployed a ...
2
votes
0answers
35 views

Solving a system of difference equations in an exponential steady-state growth setting

I have a system of difference equations in an exponential steady-state balanced growth setting; all variables grow at the same steady-state rate, say, $g$. I use the notations as follows: Variable $X$ ...
2
votes
1answer
69 views

Eliminate 3 Variable from 4 Equations

I am trying to use Mathematica to Eliminate 3 following variable from 4 equations. Any clue or link to similar solved problem is highly appreciated: ...
4
votes
1answer
44 views

How to find a recurrence relation for a sequence?

I have a sequence given by an explicit formula for n-th term: ...
5
votes
2answers
68 views

ToDiscreteTimeModel fails following video

Following the systems-modeling video here at about 15 min, 20 seconds in, the presenter (Bob Sanhedrick, I think) shows a model for an "Asteroids-game"-like 2D spacecraft. The model is trivial: ...
2
votes
0answers
20 views

Mathieu function periodicity problem

According to the documentation, the Mathieu characteristic function generates parameter a: The characteristic value Subscript[a, r] gives the value of the parameter a in y′′+(a-2q cos(2z))y=0 ...
3
votes
1answer
18 views

Select a Placeholder in a Notebook?

How might I select the 1st Placeholder in a Notebook? SelectionMove Has no option. ...
0
votes
0answers
11 views

Placeholder not working in Notebook

The Placeholder option is not working in the following example. ...
4
votes
2answers
51 views

Behavior of Commonest when there is an even split between the elements of the list it is given

How can I alter Commonest so that, when I give it an input of four zeroes and ones such as $\{0,1,1,0\}$, which has an even split in its elements, it returns the ...
0
votes
6answers
124 views

How to build a game board

I have - rather lazily - constructed a chessboard like this: ...
1
vote
1answer
84 views

Parameter Estimation of a mixture of sums of Lognormals

Let $X$ be a random variable that is of a mixture distribution of two lognormals (with the same sigma), so $X \approx p\cdot \mathcal L (\mu_1, \sigma) + (1-p)\cdot \mathcal L (\mu_2,\sigma)$. Now ...
11
votes
2answers
186 views

How can I construct and visualize a hypergraph?

A hypergraph is a generalization of a graph, in which an edge can connect more than two vertices. Thus you can think of an edge in an hypergraph as a subset of nodes. Since version 8, Mathematica has ...
9
votes
2answers
305 views

Dimensions of the results of Text[] within Graphics[]

Is there a way to get the dimensions that the results of a Text[] will occupy within a Graphics[]? Specifically, if I run ...
13
votes
1answer
250 views

Usage displays properly only after second call

If I have a usage message containig two-dimensional stuff (subscripts or formulas) and I call the usage, then sometimes I get an improperly formatted output enclosed in "...". Linebreaks are gone, but ...
5
votes
2answers
108 views

Menu item “Interrupt Evaluation…” missing in V10

The menu item “Interrupt Evaluation…” seems to have disappeared in Mathematica 10 on OS X. Well, this is a bummer. I personally use Mathematica for very long calculations, and I was using this ...
0
votes
0answers
20 views

Keyboard Shortcut several Keys

I would like to set up a system (or define a keyboard shortcut) so when you type the following sum I have the following print at the current selection. ...
2
votes
2answers
645 views

Several functions in one RegionPlot with different grayscale

I try to plot the following, but something seems to be wrong in my code and I can't figure out how to fix it: ...
4
votes
3answers
117 views

Importing High Precision (22 digits) data from a file

I want to import list from a file and I am using ReadList but my data is in format like this 8.2457409790900004e+08 but it i being imported like $8.24574*10^8$. Is ...
6
votes
6answers
678 views

How to make a resizable chess board?

For some reason I need to create a chess board. I can create a chess board by following command: ...
8
votes
2answers
101 views

interpolating function over dates

I've got a bunch of readings at various dates and times. I'd like to be able to interpolate and then integrate over, say days. I can do this by converting my date/time to ...
0
votes
1answer
56 views

Manipulate Parametric Plot [on hold]

Is it possible to plot the values of x and y in Mathematica? ...
7
votes
2answers
170 views

Is there a relatively quick way to solve my integer-valued equation?

This is a very simple problem. It can be solved by nested Forloops that exhaustively test every possible case, throwing out all non-solutions. Find all the ...
5
votes
1answer
129 views

Coloring edges of a graph according to their weight?

What's the simplest way to plot a graph with weighted edges, such that the color of the edge corresponds to the weight of the edge?
9
votes
2answers
489 views

Changing the inter-item spacing in Legends (version 9)

The new legending functionality in version 9 is much easier to use than the PlotLegends package and other bespoke ways of creating legends in earlier versions. ...
7
votes
3answers
154 views
+150

Recognizing special cases of a defined function for permuted arguments

I have a number of ugly ways to implement the following pattern recognition task, but I'm looking for something elegant to keep my notebook tidy. I need to define a function of six variables ...
3
votes
1answer
91 views

Parallel kernel and front end

I have a piece of code which looks like this: ParallelTable[ Monitor[ Table[ <code here> ,{i,i1,i2]; ,i]; ] so basically a ...
21
votes
1answer
202 views

Why is multidimensional Reverse slow?

I have found that multidimensional Reverse is ~10 times slower than exact -1 ;; 1 ;; -1: ...
3
votes
1answer
75 views

What should I do if the geographical map provided by Mathematica doesn't show some rivulets?

I have a list of geographical coordinates(maybe the coordinates are not that accurate, but the problem is not that vital): ...
1
vote
1answer
94 views

divergent part of a series

I am trying to find a function that gives me the divergent part of series in any case. The method "Series[]" does not work because Series[42,{n,0,-1}] gives as ...
5
votes
4answers
490 views

Use Mathematica to calculate the area enclosed between two curves

use mathematica Hence, calculate the exact area enclosed by these curves using Mathematica. $f(x)=x^3$ and $g(x)=x^5 - 2 x^3 - 3 x$ i have got the graph...now I'm stuck with finding the area
3
votes
2answers
189 views

approximate value for the area between the curve

Use Mathematica to obtain an approximate value for the area between the curve $y=1/4$ and the x-axis over the interval $[1,2]$ with 50 subintervals using the left endpoint, midpoint and right ...
8
votes
5answers
733 views

How to blend two photos in Mathematica?

The following two photographs forest and tiger were blended into one with screen blending mode in Photoshop. How to accomplish the same result in Mathematica? ...
1
vote
2answers
46 views

Problem with FrameLabel in the ErrorListPlot function

I've been trying to print information on the axes of a graphic. I'm doing that by the option FrameLabel in the ErrorListPlot ...
0
votes
0answers
26 views

How to prove that all zeros of the complex polynomial $P(z)$ lie in the closed unit disk $|z| \leqslant 1$? [migrated]

I want to know how to prove that all zeros of the polynomial $P(z)$ lie in the closed unit disk $|z| \leqslant 1$. Where $$P(z)=z^{n+1}+\frac{2(n+1)\cos\alpha}{n+2}z^{n}+\frac{n}{n+2}z^{n-1}+\frac{2 ...
0
votes
1answer
56 views

How to include a parameter in ListPlot

How can I include in my following ListPlot command that I want theta to have the values 0, 22.5, 45, 67.5 and 90? ...
7
votes
2answers
248 views

FEM: Nicer Element Shape for Spherical Region

I'm trying to generate a mesh for later use in the Finite Element Method of the DSolve command. It is basically a parallelepiped with a spherical indentation. I'm ...
7
votes
1answer
131 views

Driven simple harmonic oscillator — amplitude of steady state motion

I am (partly as an exercise to understand Mathematica) trying to model the response of a damped simple harmonic oscillator to a sinusoidal driving force. I can solve the differential equation with ...
5
votes
1answer
103 views

FindClusters giving wrong groupings

I am having trouble getting FindClusters to find the right clustering for this set of data (and many other sets of data similar to it): ...
0
votes
1answer
71 views

How to create an irregular pulse train? [on hold]

I was wondering if anybody knows how to create a pulse train which gives audible clicks at irregularly spaced time intervals, i.e., a time rather than a frequency domain model. A friend wrote a Matlab ...
1
vote
1answer
107 views

3D Contour Plot - parts with gradients less and more than zero

I'm trying to plot sections of the 3D Contours, with gradient less than zero, and more than zero and equal to zero. It manages to solve for the derivative, but when I apply the conditions ...
5
votes
2answers
262 views

How to get $x$ in terms of $y$ and $w$ from $w = a p x^{p-1} \left(a x^p+b y^p\right)^{\frac{1}{p}-1}$

I'm having trouble to solve the following equation for $x$ both manually and in Mathematica: $\quad \quad w = a p x^{p-1} \left(a x^p+b y^p\right)^{\frac{1}{p}-1}$ In Mathematica notation: ...
5
votes
1answer
144 views

How to find this limit correctly?

How to find the limit Limit[n*Sin[2*Pi*Exp[1]*n!], n -> Infinity] ? Mathematica 10 outputs ...
3
votes
0answers
34 views

Stuck in local minimum in NonlinearModelFit using Simulated Annealing?

I recorded a set of experimental rates $r = r(c,T,P)$ at 2 values of $c$ and >15 values of $T$. $r(c,T,P)$ obeys the following functional form: $$ r(c,T,P) = ...

15 30 50 per page