3
votes
1answer
199 views

Is it possible to change the fontsize when printing a notebook in the working environment?

I want to print a notebook that owns syntax color,I use the Szabolcs's method SetOptions[$FrontEndSession, PrintingStyleEnvironment -> "Working"] Then I can ...
8
votes
1answer
173 views

User-defined DistanceFunction for RegionNearest

In the function Nearest , I can define my custom function using the DistanceFunction option. e.g: ...
2
votes
0answers
131 views

Displaying subscripted symbols with TraditionalForm

I have pasted this code in from Mathematica 10 ...
7
votes
2answers
180 views

How to name a variable with the value of another variable?

A simple but very important (at least for me) question. In some languages for defining a variable, for example, we can do: i=10 "d"&i=30 So I have defined the variable d10, and... d10=30 ...
11
votes
5answers
358 views

How to prevent function from passing values to slot

For the following example: {#, #} & /@ {1, 2} I am trying to find a method to hold one of the slots (or both ) so that the function do not pass the values to ...
2
votes
1answer
255 views

Graphic using manipulate runs too slow

Here is a naive coding of a projection of a point on a sphere. It runs very slow. Can it be changed to run faster without losing its essential analytic character? ...
1
vote
2answers
47 views

how to extract a matrix and a vector from a vector [duplicate]

I have a vector like this: V = {a*exp1+b*exp2+c*exp3, a*exp4+b*exp5+c*exp6, a*exp7+b*exp8+c*exp9} and I want to get : ...
4
votes
1answer
491 views

Use of Strassen's algorithm

Strassen's algorithm is an algorithm for matrix multiplication that is asymptotically faster than the naive one. In practice, the matrices involved have to be quite large before Strassen's algorithm ...
4
votes
0answers
128 views

Precision problem while evaluating RegionMember or Element in V10

I'll try to give you a background on where the problem occured. The problem itself is defined near the end of the post. I'm running a sort of a simulation of a particle in a box. I finally got my ...
5
votes
1answer
204 views

How can I efficiently ArrayFlatten a matrix of sparse matrices?

I have a matrix of sparse matrices that I want to convert to a sparse block matrix. So, basically I want what ArrayFlatten does, except that I want the output to be ...
4
votes
2answers
120 views

How do I make my function behave more like Plot? [duplicate]

I have written a function Fun as below: ...
1
vote
1answer
92 views

How to solve the warning problem and obtain real roots without imaginary part?

I am trying to solve a equation with Newton's method via FindRoot, and the codes are: Define the functions: ...
3
votes
1answer
239 views

How to smoothly change the radius of a circle by dragging its circumference?

I am attempting to set an EventHandler to change the radius of a circle by dragging on its circumference. But the response to the dragging is terribly slow. What is ...
1
vote
3answers
492 views

Finding maximum value with position from Table of values

I have this table of values, how do I find the maximum value? i.e. find $z_{max}(x,y)$ ...
2
votes
2answers
183 views

How to draw a line (1D) with labeled subdivisions

I want to draw a simple line with some symbols, but so far have had no luck finding an easy way to do it in Mathematica. Does anyone know if Mathematica can easily implement e.g. the example below?
9
votes
0answers
301 views

Dataset: cannot reproduce a basic example. A bug? [duplicate]

Just to report: I try to reproduce the very first example for the Dataset from the Documentation Center: ...
0
votes
1answer
94 views

Solving minimum length confidence interval problem

I'm trying to find the minimum length of a confidence interval for the variance from a sample iid with normal distribution. I tried ...
5
votes
1answer
347 views

How can one compute a 3D Periodic Delaunay Triangulation using DelaunayMesh?

Given a non-periodic point set, one can easily tetrahedralize it using the new (in V10) DelaunayMesh function. e.g.: ...
1
vote
2answers
104 views

extract x and y axis from plot

I am trying to write a function that read what is the FrameLabel of a plot and translates that to filesystem friendly name, that, for instance does not contain "/" or greek characters and so on ... ...
5
votes
2answers
418 views

How to draw a box with holes using Mathematica

How to draw these two(especially the second one) graphs using Mathematica? The curve is not important.The point is how to dig some holes in a cube. BTW, These two shapes are Homotopy.
1
vote
1answer
92 views

How to Solve a Sequence in Mathematica [duplicate]

Given the input and the output, how do you interpolate a function in Mathematica? For example if you know that $f(1)=\frac{1}{2}$, $f(2)=\frac{1}{3}$, $f(3)=\frac{1}{4}$,... how would you solve for ...
24
votes
1answer
862 views

Convex optimization

I am playing with some Compressed Sensing (think single pixel camera) applications and would like to have a Mathematica equivalent of a Matlab package call Convex Optimization (CVX). Specifically, I ...
6
votes
2answers
204 views

How can I save a Manipulate's control settings to a dataset?

This is probably an extremely simple question. I have a manipulate that sets variables used to define an offset, amplitude, frequency and phase of a trigonometric function. ...
6
votes
2answers
229 views

Faster Alternative to DeleteDuplicates for deleting elements in list [duplicate]

I have a list in this style data={{a1,b1,c1,d1,e1,f1}, {a2,b2,c2,d2,e2,f2}} I need to delete all elements in which b1 is ...
12
votes
12answers
644 views

How to group each element with each consecutive elements in one head

Suppose I have the following list: list = {a, b, c, d} I want to generate this result: ...
2
votes
1answer
390 views

Trying to access Twitter returns Cannot import data as JSON

I am trying to use the Social features of Mathematica 10. The Facebook interaction works, but with Twitter I am getting "Cannot import data as JSON". Example: ...
1
vote
1answer
143 views

Plot sets in the complex plane [duplicate]

I just want to know if there's a way to plot sets in the complex plane. For example $$A=\{z\in \mathbb{C},z+e^{z}=0\},\\A=\{z\in \mathbb{C},\Re(z)+e^{z}\geq0\}.$$
4
votes
1answer
253 views

Programming a recursive FFT with Mathematica

I'm trying to program a FFT using a recursive function in Mathematica, though my program is not getting me anywhere at the moment. Could you say what's wrong with it and what I can do to make it work? ...
10
votes
1answer
290 views

How to make PlotMarkers constructed from Graphics track plot style?

In this plot the Disk[] markers are not colored according to the style of the line to which they belong: ...
-2
votes
4answers
634 views

Compare elements in a list

Assume that there are three different points in x-y coordinate like: p1={4, -1}; p2={5, -2}; p3={1, 5}; In order to compare these points to each other in a ...
5
votes
2answers
88 views

Why does Rotate in PlotMarkers behave strangely?

While answering Change the inner color of markers I came across a behavior that may be a bug. I would like to know if there is another explanation. First a basic example of normal behavior: ...
21
votes
1answer
479 views

How can I export my learned ClassiferFunction[] and PredictorFunction[]s?

Mathematica 10 provides beautiful high-level machine learning functionality. Sadly, the learned functions once created are rather opaque objects. I need to use them in other projects, so here is my ...
1
vote
0answers
51 views

How to fit data with numerical solution of system of parametric ODE? [duplicate]

I need to find the parameters (k1,k2,k3,k4,k1r,k2r,k3r,k4r) that fit my data (list of [Intensity, time]) using the function <...
2
votes
2answers
237 views

Manipulate is evaluated slowly

I have this function: f[k_, θ_, ϕ_] := Cos[k*Cos[θ]*x + k*Sin[θ]*y - ϕ] I want to change the parameters $\theta, \phi,$ and $k$ to see the effects on the ...
4
votes
2answers
112 views

How can I make DensityHistogram obey the lower bound in PlotRange in version 10?

Bug introduced in 10.0.0 and fixed in 10.0.1 In version 9, DensityHistogram worked with PlotRange as expected: ...
52
votes
3answers
4k views

Numerically solving Helmholtz equation in 2D for arbitrary shapes

I would like to solve the Helmholtz equation with dirichlet boundary conditions in 2 dimensions for an arbitrary shape. (for a qualitative comparison of the eigenstates to periodic orbits in the ...
5
votes
1answer
130 views

Is there a way to check inequalities in Mathematica given restrictions?

Sorry if I'm still a noob, but is there a way to check inequalities in mathematica given some restrictions? For example how could one go about checking whether: Given $a,b,c\in\mathbb{R}$ and $a,...
6
votes
2answers
511 views

Apply function to every element of list regardless of depth

I want to apply a function to every element of a list without taking braces into account (depth level), but with the same form of output. Here is an example : ...
10
votes
3answers
576 views

Find intersection points with V10

My question departs from this one: Find intersection of pairs of straight lines but now I want to find the points with the new V10 Region-functions. ...
15
votes
3answers
530 views

Solving the magic backyard puzzle with MMA

I was trying to solve this puzzle using mma It looks like the generalization of the magic square. Anyway here my attempt:- There are four columns $(x,y,z,w)$ and nine rowa which are denoted by the ...
0
votes
1answer
43 views

Reducing Output length by introducing new variables [duplicate]

I have outputs like "expression/(1+3*c^2) +anotherexpression/(1+3*c^2)" and so on. Is there any way to set 1/(1+3*c^2)=A where A is a new variable so that the output reads like "A*expression+A*...
1
vote
2answers
752 views

3D Contour Plot parts of sphere with gradient less than 0, equal to 0 and more than 0

I want to plot only parts of the sphere of radius 1 where the gradient $\frac{\partial z}{\partial x}$ is < 0, = 0 and > 0. The full sphere is given by: ...
3
votes
1answer
217 views

ListPlot with conditions

I have a data file containing the position of about $10^5$ stars of a spiral galaxy. Here is the plot and this is the corresponding code ...
0
votes
0answers
41 views

How can Mathematica solve 7 equations and want to find 7 variables [duplicate]

I have 7 equations as below * e1 := (1 - a) p Subscript[A, 0] Subscript[s, K ] ! *SubsuperscriptBox[(s), (L), (-a)] = (1 - b) Subscript[B, 0] (1 - Subscript[s, K]) (1 - Subscript[s, L])^-b; ...
1
vote
0answers
348 views

specifying a list (vector) of arbitrary length

When trying to do symbolic calculations in mathematica involving a space of dimension n, which is arbitrary but fixed, I'd often like to work with vectors that have ...
2
votes
1answer
96 views

DatabaseLink Example for DB2 and Mathematica

could someone please point me to good example on how to make a JDBC connection to an IBM DB2 database?
-1
votes
1answer
271 views

How to get solution from DSolve

How to get the solution from DSolve in such way that there is no need to copy the result. When for example solving: ...
0
votes
2answers
224 views

prime-palindromic number selected from a list

I want to find all prime-palindromic numbers up to 5000. Prime-palindromic numbers are numbers that themselves and their reverse digits are both primes. For example, 31 is a prime-palindromic number ...
9
votes
1answer
156 views

Operator syntax for Merge-like Query

Bug introduced in 10.0.0 and fixed in 10.0.2 Is it possible to take advantage of Dataset's Query operator syntax to Merge parallel queries thereby avoiding Function's that are otherwise required? ...
6
votes
1answer
373 views

How to plot stability region of Fourier analysis

Stability limits for Runge–Kutta methods in the complex ΩΔt-plane are needed to be plotted like this: For example, let P=1+z where ...

15 30 50 per page