13
votes
4answers
319 views

Button evaluation inside DynamicModule

Someone know why this Button works when clicked: ...
2
votes
0answers
78 views

“LinkOpen::linke : specified file is not a mathlink executable”

The following code runs fine if I run it interactively: ...
6
votes
3answers
139 views

Strange behaviour when line-wrapping text in a Pane

I noticed some strange behaviour of Pane. In the result from the following code, the line wrapping is not consistent: why do the first and last line contain four ...
12
votes
2answers
222 views

Why do NumberForm and Round apparently use different tie-breaking methods?

When rounding numbers (for example, rounding a real number to the nearest integer), the "round to nearest" rule is usually used. For example, 1.4 is rounded down to 1 and 1.6 is rounded up to 2. ...
7
votes
1answer
588 views

How do I flatten transparency on a graphics, for conversion to eps or similar?

I've got a graphic that I'd like to save as an eps file. Trouble is, the graphic has some transparency to it. Since the eps format doesn't handle transparency, I want to flatten the transparency out, ...
0
votes
0answers
400 views

How to Output Chi-Squared Statistics when using NonLinearModelFit

I am using NonLinearModelFit for some curve fitting and I was wondering if NLM is able to output chi-squared/leastsquared statistics from the best-fit parameters and confidence intervals. From my ...
5
votes
2answers
124 views

How to resolve a Unix symlink?

Does Mathematica have any function to resolve a Unix symlink (recursively, if necessary) to its real path?
1
vote
1answer
63 views

List-manipulation Interpolation

For example, I have the following list: AA={{0, 20000.}, {26.6, 19950.}, {53.2, 19950.}, {79.8, 19950.}, {97.1198, 18644.1}, {102.681, 16452.3}} Another ...
4
votes
2answers
131 views

Equivalent of __FILE__?

Many languages define a special identifier whose value is the path to the source file currently being processed. (For example, in C, this is done through the ...
0
votes
1answer
86 views

Question with ParametricNDSolveValue

When solving the following system: ...
2
votes
0answers
64 views

How to create a ListPlot containing two lists? [duplicate]

I'm trying to plot a set of points where one list corresponds to the X values another list corresponds to the Y values. I have ...
5
votes
2answers
207 views

Building conditional lists with Manipulate

I'm trying to select elements of a list that satisfy some criteria using Manipulate[]. Given 2 lists: ...
1
vote
1answer
92 views

Exporting a histogram to PDF in without rasterising it

How can I export a histogram without rasterising it? The labels and axes seem unaffected, but the bars themselves are pixelated when I zoom into them in a PDF viewer. For example, if I run ...
23
votes
3answers
794 views

Getting serious about Mathematica programming

I'm at a point in my Mathematica journey where I need to be a little bit more strategic about my coding. Presently, I have a bunch of notebook files organized using the filesystem of the OS and ...
2
votes
1answer
445 views

Having Problem with Importing Excel file to Mathematica Notebook?

I have solved some equations and exported the final results, which they are several Matrices, as a EXCEL file ( .Xls ). Now, I want to use these EXCEL files as my inputs to solve some other equations. ...
7
votes
1answer
121 views

What should I call the messages that appear when the mouse moves over failed graphics output?

I attempted to evaluate the following Plot[x^2, {x, 1, 2}, PlotStyle -> {RGBColor[a]}] which, of course, failed. After the failure, putting my mouse over the ...
15
votes
2answers
258 views

MathKernel doesn't return all Messages

In Mathematica I run this command: Plot[Sin[x], {x, 1, 15}, GridLines -> error] It generates a Plot with this error message: A GridLines specification ...
5
votes
1answer
90 views

Replace content of selected cells, each getting different new content

Let's say I select 2 different cells and then attempt to replace their content using NotebookWrite inside a button. How might I replace each cell's content ...
1
vote
1answer
123 views

Behaviour of Locator

I seek advice regarding the constrained behaviour of the Locator: appears confined to square {0,0}->{1,1}. When I change starting position it snaps to this constrained region. The code I am referring ...
0
votes
1answer
100 views

Why do I get a different answer from the use of TrigExpand?

This is an old post but I get two different answers from Mathematica 9.0.1.0 ...
0
votes
1answer
267 views

Projecting on an arbitrary plane

I have the following code, giving me a representation of a photon hitting a cylinder: ...
3
votes
3answers
145 views

Renaming a list with name obtained interactively

I have a list say: m = {1, 2, 3} The list is inside a package, and is the result of a calculation. I want to give the user the option to rename it, for example ...
1
vote
1answer
94 views

NotebookWrite Multiple Selected Objects

Lets say I select shapes in a Graphics diagram in the following picture. Generated from the following set of code: ...
3
votes
1answer
141 views

Isolate a specific contour without Contour Shading

I have a contour plot that took a few hours to evaluate. Is there a way that I can show only the contour lines of a specific value without re-evaluating the contour plot?
-1
votes
1answer
107 views

Plotting a function dependent on $x/d$

I have a problem in plotting a function. The example code is as following: ...
11
votes
2answers
264 views

Clever use of DownValues, or failure to understand the “Mathematica Way.”

I needed to look at the changes in the values of about 4000 items from one year to the next. I have a table with identifiers and values for each year. Not all of the items are in each list. The ...
0
votes
1answer
162 views

Solve equation containing conditions (If expressions)

I want to solve the underneath equation. If I try Solve[AAA,dc], then I get no solution. Can anybody explain this? ...
4
votes
2answers
186 views

Using Greek letters with subscripts as symbols

I'd like to use Subscript[ϕ, 1] as a function name: Subscript[ϕ, 1][x_] = C1 + C2*x + C3*Exp[α*x] + C4*Exp[-α*x] But as I use ...
3
votes
3answers
159 views

Using subscript in a string

I am trying to create a string of the form $0 < d_1 < d_2 < \ldots < d_n$ For a given n. My closest attempt so far is ...
9
votes
1answer
231 views

$1 - \sqrt{5}$ $\in$ $\mathbf{R}$?

Why is there a difference in the output of the following codes? First: ...
0
votes
4answers
441 views

Problem with plotting legends using the PlotLegends package

Here is my problem : I have a table composed of 3 "under"-Lists and I'd like to plot it with legends, but I can't find a way to do it. ...
0
votes
1answer
118 views

plot probability

Hi I just want to flatten a function, I tied it with Joined->True, but it did not work, hope somebody of you can help me. This is my code: ...
1
vote
1answer
130 views

Problem about Solve

See this example : ...
1
vote
1answer
45 views

Aborting a computation correctly in .NETLink to allow future computations

Has anyone had any success using the AbortEvaluation() function in IKernelLink to stop a computation and then do more ...
3
votes
3answers
275 views

Simplifying expression involving total derivatives [closed]

I'm trying to simplify expressions involving partial derivatives of an abstract functions. To obtain the human readable result, I would like to gather terms of total derivatives and hold on ...
0
votes
1answer
154 views

find derivative with defined function

s[a_, b_] := NDSolve[{y''[x] == y[x] Cos[x + y[x]], y[0] == a, y'[0] == 1}, y, {x,0, b}] I need to find the minimal of $\int _1^by[x]^2$ in the region ...
1
vote
3answers
184 views

How to define a function based on the output of DSolve? [duplicate]

I would like to define a function based on the output of the following DSolve call: ...
5
votes
2answers
115 views

Short circuit logical operators [duplicate]

Suppose I want to compute $f(1)\vee f(2) \vee \ldots \vee f(10^{10})$, but I know a priori that $f(n)$ is True for some $n \ll 10^{10}$ with high probability. For ...
7
votes
1answer
136 views

Specifying optional arguments with variables

Perhaps this is poor programming on my part, but I would like to create a function that uses a variable as an optional parameter: var = 2; f[a_:var] := {a} The ...
1
vote
2answers
131 views

Lists not being recognized correctly within manipulate

I've created a keyboard-free panning system within Mathematica. The code does the job, but I continually get errors in relation to it, and I cannot seem to get it to perform within a CDF because of ...
5
votes
1answer
195 views

Altering layout and sizing of Manipulate controls?

I'm currently working on a display project using Manipulate and was wondering if there is a straightforward way to alter the placement of the control options that I ...
-4
votes
1answer
181 views

findroot, derivative in defined functions

I apologize for my unclear question, I will write it in a more detailed way. I first define: ...
2
votes
2answers
178 views

Intersection & Complement operations for lists of Morphological Components?

I have an array of $M$ sets of morphological components corresponding to the same image, however computed in different ways. For example, we might have: ...
19
votes
0answers
227 views

Why does list assignment with a packed array result in unpacked values?

This is another question on the design choices in Mathematica. I understand that without direct reply from the developers it may not be possible to give a definitive and exhaustive answer to "why" ...
6
votes
3answers
387 views

Opacity and overlapping multiple polygons

Let's say I have 100 polygons that are all different but most of them overlap. All I want to do is to draw/plot them in one single graphic with linearly adding gray values; i.e., a point with ...
2
votes
1answer
193 views

Looking for equivalent of MinorTicks->None

I am looking for the most general possible way to suppress the display of minor ticks in Mathematica plots.1 More specifically, I'm looking for the equivalent (or near-equivalent) of a fictional ...
1
vote
1answer
130 views

Averaging multiple 2D data sets

I have multiple data sets, each of which is a 2D matrix. I want to construct a new 2D Matrix in which each element is the average of that element for all the original data sets. i.e ...
3
votes
1answer
456 views

How can I run .exe file in Mathematica

we have a .exe file. It takes input as .txt file and gives output as another .txt file. ...
3
votes
1answer
405 views

Finding intersection of two graphs

Here is a toy problem: I have a (directional) line that starts from {2,0} and goes through {1.8, 0.01}. Also I have a ...
5
votes
2answers
209 views

Overlapping pure functions

Let say I need and option for Plot: RegionFunction -> (-6 < #2 < 6 &) But I also want those ...

15 30 50 per page