9
votes
4answers
165 views

Evaluation of Alternatives

I recently stumbled upon a few examples that suggest patterns containing Alternatives do not evaluate for individual alternatives. For example: ...
5
votes
2answers
64 views

How to define a complicated function inside the body of Compile?

I want to compile a function in a way to keep its memory footprint down. In the example below, I am trying to compile a function f that makes three calls to ...
0
votes
0answers
46 views

Why doesn't mathematica evaluate the cells?

I have the following code in mathematica. Everything was ok and I was simplifying but suddenly mathematica crashed and after that it seems that it doesn't evaluate the functions. ...
5
votes
2answers
48 views

Why ParallelEvaluate[x = 0; {$KernelID, Dynamic[x]}] returns {{1,x},{2,x}}?

I'd expect that ParallelEvaluate[x = 0; {$KernelID, Dynamic[x]}] returns {{1, 0}, {2, 0}}, and that if in a parallel ...
0
votes
0answers
41 views

Unable to plot higher order polynomial equation using NSolve and contourplot

I have a polynomial equation in 'a,b' and I am trying to plot a curve between 'a' and 'b'. Both NSolve and ContourPlot works well upto 'a=15' , but after that the plot has scattered points. Is this ...
0
votes
1answer
53 views

how to generate a 3d graph of HCP crystal structure [duplicate]

I am confused with lattice parameter and the basis. The structure I generated is not HCP. To verify this, one could use this plotting function from the answer to Can a LatticeData image be displayed ...
0
votes
0answers
22 views

MatrixForm in Mathematica [duplicate]

I wanted to do subtractions between to matrices and I did the following ...
9
votes
1answer
108 views

Is equation numbering in exported HTML considered deprecated for built in stylesheets?

TLDR or simply stated: how do I export equation/section numbers to HTML? The built-in function doesn't seem to do it. Longer form of the question: So I've been tinkering around with the built in ...
12
votes
5answers
251 views

How to extract a contour line (or a region) from a ContourPlot?

Given a ContourPlot with a set of contours, say, this: is it possible to get the contours separating domains with the different colors in the form of lists? ...
0
votes
0answers
26 views

how to plot many curves for different values of a certain parameter [on hold]

how to plot many curves for different values of a certain parameter of a function? how to plot many curves for different values of a certain parameter of a function? i.e. i need to get one figure ...
2
votes
1answer
57 views

How to get the analytical solution of this equation set

There is a equation set: {2 x^2 + 49 - 7 x - 2 x Sqrt[x^2 + 49 - 7 x] Cos[rad] == (7 - x)^2, 2 x^2 + 49 - 7 x - 2 x Sqrt[x^2 + 49 - 7 x] Cos[rad + Pi/3] == 49} ...
1
vote
2answers
46 views

Manipulate slider freeze, and empty value in box

Here's a MWE code to show two problems I'm experiencing with the sliders and their value box, under Manipulate : ...
2
votes
1answer
133 views

Manipulations with options

I have two functions with options, for example f and g ...
4
votes
1answer
74 views

Why a part of this expression, similar to another, is left unchanged?

An expression has one of its part replaceable and one, strictly similar, that isn't. Please, can you point at the difference ? I can't pinpoint the complication ... The FullForm of ...
4
votes
1answer
283 views
2
votes
1answer
64 views

Is there a bug of InverseDistanceTransform?

This is a example of documentation about InverseDistanceTransform. But this is my picture But it doesn't work: ...
1
vote
1answer
44 views

NIntegrate::inumri: error [on hold]

I am getting the following error: NIntegrate::inumri: The integrand c (1-0.6 (1-(1+Times[<<2>>])^0.5)-0.4 (1- (1+Times[<<2>>])^0.5)) (1-0.6 (1-(1+Times[<<2>>])^0.5)-0.4 (1- ...
0
votes
1answer
52 views

NumberForm pesky warning from Manipulate

I'm using the NumberForm command inside a Manipulate environment, and in some special cases Mathematica gives a pesky and mostly useless warning message : NumberForm::sigz: In addition to the ...
1
vote
1answer
69 views

Estimating error in NDSolve

I would like to give a theoretical estimation of local truncation error (and then for the global one) for a solution to a numerical initial value problem by ...
2
votes
1answer
49 views

Problems with QueueingNetworkProcess [on hold]

I have a two stage queueing network and want to vary the number of servers at the second node. The input data and the Manipulate command is below: ...
2
votes
1answer
226 views

Existence of an analytical form for integral

Can the following integration be performed with an analytical output? ...
0
votes
1answer
44 views

How to make an empty list inside a module program? It consatly spews errors [duplicate]

Okay, so, I'm trying to write a program within the module. It goes like this: create empty list, join it with a sample from a certain set called MyList, and then repeat it certain number of times. ...
3
votes
2answers
76 views

MeshRefinementFunction missing points

I'm doing some FEM on a rectangular region with a spherical cavity: ...
11
votes
6answers
936 views

How to set precision and format labeled Slider in Manipulate?

For my calculations, I need increased precision of parameter k in my Manipulate: ...
4
votes
3answers
151 views

Graph generation from a non-paired edge list

The elements in e = {{6414, 6598, 6927}, {7, 1035, 2382, 6927}, …} are the graph nodes; for example, {6414,6598,6927} is ...
2
votes
0answers
23 views

weird behaviour of Listable fortran Librarylink function: different result each evaluation

I am working with fotran librarylink function currently. In this post, I will show some weird result of Listable fortran librarylink generated by intel compiler under windows (I tried gcc on linux the ...
-2
votes
0answers
51 views

NDeigensystem returns complex non-hermitian error for the calculation of vibrations of a cantilever [duplicate]

We are trying to use NDEigensystem to solve for the vibration of a cantilever with a triangular cross-section. The relevant PDE is $\mu \nabla^2 \vec u + (\lambda + \mu) \nabla(\nabla \cdot \vec u) = ...
0
votes
1answer
61 views

what do those signs #1, #1^2, #1^3, & mean here? [duplicate]

I have read common pitfalls page and the documentation page but I still don't understand what do those signs mean here? ...
3
votes
0answers
47 views

Weird behaviour for a vector InterpolatingFunction inside an NDSolve

I have run into some weird behaviour on the part of NDSolve which I find pretty bizarre and which I would like to understand better. Suppose, for the sake of ...
0
votes
0answers
18 views

Private Style in a StyleSheet with preformatted text

I want to create a new Style in my private StyleSheet. I duplicated the Style "Text" and made some alterations. Now I want that a Cell with this style has an expression already filled in, for example ...
6
votes
2answers
843 views

How to create a histogram of annual events, such as cherry blossom time

I have calculated blooming and ripening times for a specific variety of plant, based on actual temperature data from over 40 years. I would like to create two histograms on a single axis; one for ...
0
votes
0answers
73 views

Phase space of a system of differential equation

I have a system of three Coupled nonlinear equation of a physical system and i would like to plot the phase space. My system is a chaotic system dependant of three variable dependant of time (l1, ...
2
votes
0answers
33 views

Generation of Space Representation of non-crystallographic Point Groups

In Mathematica the command FiniteGroupData[{"CrystallographicPointGroup",<group number>}, "SpaceRepresentation"] yields the space representation ...
0
votes
2answers
182 views

Using different colors in TreeForm?

I've used TreeForm, and I appreciate that the syntax is fairly short, especially in comparison with TreeGraph. Is it possible ...
2
votes
0answers
29 views

WhenEvent and Resetting of Variable in PDE when operation succeeds

I have had success in using WhenEvent to reset or change a variable within NDSolve with ordinary differential equations. My ...
4
votes
1answer
80 views

System of equations is solved by NDSolve over just a tiny domain

I'm solving numerically a system of differential equations with the use of NDSolve. The numerical integration works only a very small interval of the argument. I'm ...
0
votes
0answers
50 views

Fourier-style solutions to differential equations, not piecewise polynomials

NDSolve returns piecewise polynomials. Is there any way I can get a single (non piecewise) function consisting of sines and cosines instead? Sort of a "Fourier approximation" to the solution of my ...
10
votes
1answer
72 views

Use of some functions of the Developer Utility Package, such as BesselSimplify

The Developer Utilities Package contains several functions that look interesting: BesselSimplify GammaSimplify ...
10
votes
1answer
112 views

Plot of $sin(x^x)$ is missing from $x=143$

When plotting the graph of $sin(x^x)$ I noticed that there is no plot from about $x=143$. I don't suppose there is a purely mathematical explanation for this? So, why is there no graph in ...
0
votes
1answer
23 views

Why can't I change the Magnification in Printout Style in Default.nb

This happens with Mathermatica 10.3.1.0: When working with a notebook, I can choose between different working environments. However, they inherit their settings from Default.nb situated at ...
2
votes
2answers
145 views

Symbolic vs numerical integration

This is related to a question that I asked before but didn't resolve quite well. I want to obtain the solution of the following expression analytically: ...
1
vote
0answers
66 views

Possible memory leak in FindMinimum? (MMA v10.0)

So I was running some code when I noticed Mathematica was gulping memory, and after some debugging I think the culprit is found. It turned out the function ...
42
votes
7answers
21k views

Labeling individual curves in Mathematica

I need to create a plot for export and inclusion in a report. Is there a better way to label curves than PlotLegends? From what I've read and my personal ...
5
votes
2answers
100 views

Linear fit with conditional noise distribution

I need to fit a linear model of the form $y_i = a · x_i + b + e_i$. The $e_i$ are independent noise from a distribution that depends on $x$ as well as on global parameters of the data; however, the ...
2
votes
1answer
109 views

solving coupled differential equations with parameters subject to optimization problem

I have an equation, but I don’t know how to program it in Mathematica: x[0]==1; y[0]==1; x'[t]==(a+b) x[t] y[t]; y'[t]==a b y[t]/x[t]; where ...
3
votes
0answers
103 views

Efficiently generating tuples with Outer

I'm trying to efficiently generate tuples of lists of objects that satisfy a given criterion. The similar questions that I have found on this website end up finding a specific workaround for the given ...
1
vote
1answer
27 views

Length in Compile encounter “type Integer encountered in assignment of Type Real ”

Compile[{}, Module[{n}, n = Length[{1, 2, 3, 4}]; n = n/2]] The above code will emit errors Compile::cset: Variable n of type _Integer encountered in ...
1
vote
1answer
373 views

Numerical solutions of Gross-Pitaevskii equation [on hold]

I am trying to solve the Gross-Pitaevskii equation numerically and using NDSolve, but this seems to be a dead end. The problem is boundary and initial conditions ...
2
votes
1answer
60 views

Notebook Magnification changes - Why?

I have written a notebook but in order to edit it, I prefer 125% magification or even 150%. I know Window>Magnification. Also there is a small symbol on the right bottom of the notebook, where I can ...
3
votes
0answers
72 views

Export bug in combination with ParallelTable?

I am programming with Mathematica 10.3.1.0 on Windows 10 Professional 64 Bit and have an i7-4940-MX 3,1 GHz processor (4 cores). When I use in the example code below ...

15 30 50 per page