# All Questions

136 views

### How do I mimic the functionality of “<>”?

The Cell expression for: <> is Cell[BoxData["<>"], "Input"] However similar expressions are parsed into ...
1k views

### Map a function across a list conditionally

It seems that this is a really basic question, and I feel that the answer should be obvious to me. However, I am not seeing. Can you please help me? Thanks. Suppose I have a list of data ...
565 views

### Manipulate a Differential Equation result

I want to Manipulate the result of Differential Equation like : ...
82 views

### MousePosition Scaling over a cell

I'm trying to have the button follow the mouse while within the output text cell. The scaling does not exactly work as intended (fails to follow mouse correctly). ...
501 views

### Determine whether some expression contains a given symbol

Given a symbol t and an expression expr, how can I determine whether or not the symbol t ...
139 views

### Problem with UpdateInterval

I want to monitor current results with Dynamic ...
249 views

### Differentiating an unknown solution to a PDE

Sorry if this question is too basic -- I'm not very familiar with Mathematica. I am interested in a way to systematically address the following sort of problem: Suppose that $u=u(x,y)$ is a function ...
1k views

### FindFit returns worse result when putting constraints on parameters

I want to fit some data to a model of exponential decay using the FindFit function: ...
399 views

### A palette of accumulated expertise

I've been trying to put together a palette of useful functionality garnered from this site. There is useful stuff scattered all over the place, for example: Post an image Copy code Duplicate a ...
363 views

### How to simplify the following trigonometry expression such that the number of used characters is minimal?

How to simplify the following trigonometry expression such that the number of used characters is minimal? (13*Cos[t] - 5*Cos[2*t] - 2*Cos[3*t] - Cos[4*t])/4 The ...
182 views

### Odd behavior of GridGraph and DirectedEdges

For some reason the option DirectedEdges->True, albeit working internally with grid graph, does not appear in the visualisation for 1D and 2D graphs. It also ...
158 views

### Keywords to find documentation for this syntax

Mathematica allows this syntax, but I cannot find any documentation (or books) that discuss the various uses/advantages of it ...
1k views

### Solving a system of equations in two variables

I have a system of two equations in two variables $x$ and $y$. \begin{align} F_1(a,b,c,d,e)x+F_2(a,b,c,d,e)y+F_3(a,b,c,d,e)&=0\\ G_1(a,b,c,d,e)x+G_2(a,b,c,d,e)y+G_3(a,b,c,d,e)&=0 ...
283 views

### Find elements in a decay chain using IsotopeData

I am trying to write a program using the Mathematica function IsotopeData, but am finding the code troublesome. Due to my (relative) familiarity with Python, I am ...
341 views

### How to obtain a fixed number of solutions to $x+y=1$?

How to obtain a fixed number of solutions to $x+y=1$? For example, I want 4 solutions: $(1,0),(2,-1),(3,-2),(-2,3)$ I want to do this also on bigger equations such as $x+y+...=1$ and then I want to ...
303 views

### How can I interrupt Speak?

I want to use an event handler to stop speaking: Speak[ExampleData[{"Text", "DonQuixoteISpanish"}]] The only way I can stop this is by restarting mathematica!
872 views

### Efficient implementation of cubic equation of state

...In this case the Peng Robinson Equation of State. Equations of state are empirical equations with parameters derived from experimental data. They are used to predict pure component and mixture ...
431 views

### Replace values which obey certain criteria

I'd like to replace all values in a list which obey one or more criteria with another value. Example: Replace all values>30 by 30. data={{3,35},{2,7}} ...
200 views

### Arranging elements in a Grid by drag&drop

I have some elements in a Grid. I want to change their positions within that Grid. Can I swap their positions just by dragging ...
113 views

### How to explain the results of the following integrals?

Why does the following program lead to different results of a21 and a211? ...
107 views

### Using EdgeList on a once empty Graph crashes the kernel

Calling EdgeList on a non-empty graph which was previously empty causes the math kernel to crash. For example, ...
114 views

### Problems with setting style options

Consider the following: FirstOutput=Style["Test", FontSize -> 20] SetOptions[Style, FontSize -> 20]; SecondOutput=Style["Test"] I would like the string ...
258 views

### Creating multicolored meshed plots (connected scatter plots) using ListPlot

I would like to make colored scatter plots where the dots are connected by lines. I have tried the following, using Joined->True to connect the dots and ...
718 views

### Emulating R data frame getters with UpValues

What's the best way to emulate R's data frames functionality? This includes the ability to select rows and columns in a 2-dimensional table by the string identifiers positioned typically in the first ...
287 views

### Defining a function using Series? [duplicate]

Possible Duplicate: General::ivar is not a valid variable when plotting - what actually causes this and how to avoid it? I need to define a function using the output of series, i.e. ...
335 views

### Simple contour integral with a parameter gone wrong

I run into the following problem, I tried to evaluate a very simple integral: Assuming[ a > 0 , Integrate[Sin[a*s]/(s - I)^2, {s, -Infinity, Infinity}]] ...
150 views

I'm looking to create dynamic menus with multiple options, and would allow multiple selections. For example, mousing over an object (let's say a black circle of rad 1), a menu would popup at ...
472 views

### Implicit Equality and RegionPlot

I have the following problem: I would like to do a RegionPlot like RegionPlot[F[x,z,y]<1,{x,0,1},{y,0,1}] The problem is that the variable z is an implicit ...
3k views

### Filling between boundaries

I would like to visualize what it graphically means to integrate between two boundary values. Therefor I'd like to make a Filling between these two values. Is there a way to get this done?
245 views

### How to simplify the integration result of the following program?

In the following program, the fec[x] is a function depending on $x$ while q3[t] and q5[t] ...
694 views

### How do I make a log plot where the plot is logarithmic in the distance from the X-Axis (including negative values)?

For example, if I were to do a plot of Sin[x], I would get what looks like a Log plot of Sin[x], with another log plot of ...
124 views

### semantics of ContinuousAction on a slider. Mouse release

I needed to make 2 slider inter-dependent. Slider b in this example can't be larger than slider a. When I move slider ...
285 views

### How can SquareWave be used as the input in OutputResponse?

I'd like to compute the response of a TransferFunctionModel when driven by a SquareWave. Here's a simple example, ...
986 views

### What is the fastest way to count square-free words?

Background A word is a string of letters in an alphabet. A square-free word has no adjacent repeating substring. For example, (in the ternary alphabet of {0,1,2}) the words 00, 012121, and 0212012021 ...
231 views

### How can I emit a sound only during a mouseover?

Emitting a constant sound or note (no interruptions) for a fixed duration is easy, but a dynamic duration, not so easy.
313 views

### Building a list recursive with one or more arguments

Consider the following: data={a,b,c,d}; res={{a,b,c,d},{b,c,d,e},{c,d,e,f},{d,e,f,g}}; The idea is to define a function ...
442 views

### Getting consistent Ticks lengths and TickLabels positioning

From the Documentation, Tick mark lengths are given as a fraction of the distance across the whole plot. I wish to have identical tick mark lengths for both horizontal and vertical ticks and I ...
543 views

### Interpreting the interpolating function and saving data to plot with external program

So far I have been solving non-linear pdes with NDSolve and then plotting the result with the in-built Plot3D and ...
1k views

### Counting negative values in list

I would like to count the negative values of a list. My approach was Count[data, -_] which doesn't work. How can I tell Mathematica to count all numbers with ...
208 views

### Clean up list of partial outputs for memory

Context I run long Mathematica sessions; sometimes I have Output up to Out[3000+]. Hence I would like to be able to clear out some previous outputs which do use lots of memory. Attempt I am aware ...
308 views

### find subsequences of constant increase

A list like l = {0, 1, 2, 3, 4, 5, 7, 9, 12, 13, 18, 19} may have subsequences of constant increase, $a_{n+1} = a_n + k$. For example: ...
1k views

### How to make hollow polyhedra?

I found a version of the Mathematica spikey in 3D printable format (STL) at the Shapeways site that was hollow. Here it is when viewed in MeshLab: You can see there's a bit cut out of the end, and ...
352 views

### Import numeric values from XML

I am trying to import data from an XML file and then perform calculations on those numeric values. When I import the data the values seem to be stored as strings. I tried using a ToExpression ...
269 views

### Implementation of builtin function Fold

In the documentation for fold, it says Fold[f,x,list] gives the last element of FoldList[f,x,list]. But this is surely not the way it is implemented, right? ...
157 views

### Socket communication and player pro

I'd like to create a simple communication channel between MMA and the animation package 'Maya'. This is possible over sockets ( very simple, just sending and receiving strings). I've got this working ...
172 views

### Finding mappings between expressions

Suppose we have an expression of the form: $j=\frac{A\left(t\right)}{B\left(t\right)}=\frac{C\left(s\right)}{D\left(s\right)}$ That is, $j$ can be expressed either as a function of $t$, or as a ...
179 views

### Map efficiently over duplicates in list

I am interested in mapping a function, f over a (long) list which contains duplicates. Since this function takes a while to evaluate I would like to make use of ...
5k views

### Plot Log scale on X-Axis?

There's documentation on how to do a LogPlot with respect to Y-axis, but how would you do the same for the X-axis? Is there some Plot option? For example, here are some examples that plot Log scale ...