# All Questions

609 views

### What algorithms does NSolve use?

I've been using NSolve to find roots and now I've been wondering what underlying algorithm Mathematica uses. It's probabaly similiar to ...
231 views

### Importing an mx file into a context

Consider the following simple code which dumps the global context: var = 5; DumpSave["test.mx", "Global`"]; Now, in a new notebook, I would like to import var in ...
591 views

### Combining three R, G, B matrices into a single matrix of 3-tuples?

Working with Mathematica 8 on OSX here. I have three $1024 \times 1024$ matrices representing the counts from consecutive exposures onto a CCD with $R$, $G$, and $B$ filters on it, and am looking to ...
151 views

### LogPlot and LogLogPlot do not output their legends correctly

When I give lists of functions to LogPlot or LogLogPlot with the option of PlotLegends, the ...
313 views

...
1k views

### Derivative of the Absolute Value Function in Mathematica looks very different from the actual answer

Derivative of the Abs Function in Mathematica looks very different than the actual answer. Why? How to correct this? For example I entered ...
287 views

### Mathematica 9 cannot solve a difference equation that Mathematica 8 can

Consider RSolve[{a[n + 1] == 2 a[n] + n (1 + 2^n), a[1] == 1}, a[n], n] Mathematica 8 can solve this quickly, but Mathematica 9, even after being allowed to run ...
209 views

### TreePlot, VertexRenderingFunction and stretched vertices issue

Recently I found the following TreePlot issue. For simplicity, I took an example from Mathematica Tree Drawing Tutorial and set ...
265 views

### Split list of states by run lengths and discontinuous changes in state

I was asked to look into writing some simulation code for a user, where the simulation output (x) would oscillate between three possible states: ...
418 views

### To solve Cylinderical PDE

I want to solve this PDE. I have tried to solve it with NDSolve but found error 'Boundary values may only be specified for one independent variable. Initial values ...
599 views

### Computing the volume and the curved surface area

I'm trying to compute this function $y=\frac{1}{2}e^x+\frac{1}{12}e^{-3x}$ to get the volume of the solid of revolution when the area under the curve is revolved once around the x axis. And than get ...
187 views

### Why is Mathematica not able to calculate more digits [duplicate]

When I want a numerical value with a precision of 50 digits... N[1.15/(1 - E^-0.2)^2, 50] Why is Mathematica not able to provide the desired solution? And I ...
875 views

267 views

### Adjust the opacity of the lines in a ListPlot

Here is what I am trying to plot: ...
351 views

### Simplifying fractions

What ComplexityFunction (or other technique) can I use to have Mathematica pull things out of fractions? I have a rational function of several variables and I'd ...
70 views

### Show List of HighlightGraph Objects in Matrix

I'm new to Mathematica and can't get my problem solved. I want to display a list of HighlightGraph objects in MatrixForm like <...
421 views

### How to simplify power series in terms of functions

For example, after some computations mathematica outputs $$\sum_{k=0}^{\infty} \frac{k g_k z^{k+4}}{(1-z)^3}$$ and we assume that $$G(z)= \sum_{k=0}^{\infty} g_k z^k$$ so the question is: how ...
436 views

### Do any mainstream text editors support Wolfram Language syntax for highlighting? [duplicate]

Syntax Highlighting for Mathematica on a Blog There is the above, but I'm not terribly excited to install rogue packages. For example on github, I share lots of Mathematica code. I see no way to ...
150 views

### How to save the results in an identical Excel file (.xls) in each iteration of a Do loop

Assume the following code (Below code is just an example to clearly illustrate my problem): ...
170 views

### Is it possible to model the piano key attack?

My purpose is to model the attack of a piano key. As the key is pressed a sound must be emitted. When the key is released the sound must stop with decreasing volume. I have a partial success when ...
78 views

### What's going wrong with this button! [duplicate]

I'm implementing an Adaline algorithm where all inputs are 1x5526 and the output is a number from 1 to 10. I have this two functions defined and worked outside the ...
221 views

### Plotting plain data (single value lists) in 3D

Some Chemistry data sets I am trying to plot some titration data with Mathematica. I have done 4 experiments and gathered around 70 pH points (one for each milliliter) during each session, and ...
186 views

### How to make list plot when all information is in a single list

I want to make a plot , where the data is structured like so { {"l1", "l2"}, n1, n2, n3} } The values in the inner sub list are labels which are associated with ...
133 views

### Alternative for citation management in Mathematica 9 for Mac

I have just read that Mathematica 9 for Mac does not support Citation Management. Any ideas of a poor's man replacement so I can still use Mathematica on Mac for editing? I mean, have someone written ...
587 views

### Multiple plots on same graph for different parameter?

I would like to be able to Plot a function (with an implicit Integrate command) with various values for a certain parameter (<...
316 views

### Import CSV with “Numeric”->True and “DateStringFormat” problem

The CSV file linked below has 3 columns: "PT_ID" (char 4), "PHYS_ID" (char 2) and "VISIT_START_TIME" (varchar eg "0:00:15" hours minutes seconds) "https://docs.google.com/spreadsheet/pub?key=...
40 views

### Filter sublists that contain a certain value [duplicate]

This question is a followup from appending elements to sublist mergedList = { { {"a","b"}, -1.5, -5, "no" }, { {"c","d"}, -2,-10, 7 } } I ...
89 views

### If statements with a Boolean [duplicate]

If I have a vector {1,2,3}, I want to write an If statement, where if one of the positions is "1", it will perform a certain command. ...
296 views

### Mesh at Ticks positions

In a ListPlot3D[ ] I want to have the Mesh at the same positions as the ticks. For some reason this isn't default if both are ...
272 views

### Display truncation of numerical values when writing to a file

I am trying to copy some numerical values of parameters from a plain text file into Mathematica, then arranging them in a list and exporting them to another text file, with .ini extension. My problem ...
470 views

### appending element to sub list [duplicate]

I have a list of the form: lstA = { { {"a","b"}, -1.5}, { {"c","d"}, -2 } } I wanto to add another value to each sublist that ...
194 views

### Multiple swapping of rows and columns

m={{a, b, c, p}, {d, e, f, x}, {g, h, k, z}, {u, v, w, y}}; I want to swap 1st and 2nd rows by 4th and 3rd rows respectively. And then, swap 1st and 2nd columns ...
151 views

### A question about definite integrals and timing

I need to integrate the expression G given below: ...
90 views

### FlipView Alignment problem

Here's the problem with MWE: Framed[ FlipView[Framed /@ {100, 1}, Alignment -> Center] , ImageSize -> {100, 150}, Alignment -> Center] I ...
717 views

### Parallel computation of a system of differential equation

I need to solve a system of differential equations which contains, at minimum, ten thousands of differential equations. Actually, I am trying to solve density matrix equation \frac{d}{d t}\rho(t) = ...
70 views

### how implement OOP [duplicate]

I have a task implement OOP in wolfram mathematica. I think write class Point and inherit from it class Rectangle. In C# or C++ it's very easy, but I don't know how do it in wolfram mathematica. All ...
518 views

### Performance tuning - Explicitly set Mathematica use Nvidia GPU for rendering

I feel hesitated to ask this question, but I cannot figure out a way to increase the performance. The problem is about running this featured example on a computer with both Intel HD GPU and Nvidia ...
259 views

### Comparing Positions of Elements in a List

How can I check if Position[i] > Position[j] for two arbitrary elements in a given list? The problem is that Position[i] ...
155 views

### MarginalDistribution with Symbolic range in ProbabilityDistribution

Given the following joint density: for 10 < x < 20, x/2 < y < x. To find the marginal density for X we do: ...
36 views

### How to change $n$ variables with $n$ Buttons automatically [duplicate]

I was trying to make a little game, and I came accross this problem. The goal is simple. There are going to be $n$ number of buttons, and each one will change a value of one variable. For example, ...
212 views

### Manipulate for variable number of sliders

I'm trying to use Manipulate for plotting multidimensional data, where higher dimensions are defined as sliders. First, this simple example works: ...
305 views

### Conditional search along the columns of a matrix

I want to implement the following algorithm in Mathematica. Get element along main diagonal of a matrix. If the element along the main diagonal is positive, then return the positions of the elements ...
597 views

### Breaking a sorted list into bins of a specified size

Can somebody please explain me the following: If I try to split data every increase in 0.5: ...
649 views

### make mathematica recognize CCompiler and compile CUDA code on remote Windows machine

I have set up a Mathematica remote kernel on a Windows 7 64 bit machine, which has Microsoft Visual Studio 2010 installed. When I start Mathematica on the windows machine Mathematica recognizes the C-...
322 views

### Change input variable in a function [duplicate]

I'd like to write a function, that would take a matrix as an input parameter and would change it by multiplying one of its rows by a factor. I try to do it in the following way: ...
290 views

### Sampling a musical instrument (or re-tuning MIDI)

I'd like to try to convert a piece of MIDI music made with SoundNote to another tuning (not microtonal or even split-black-keys, just a slightly different tuning for each note). I searched for pitch ...
273 views

### Center Diverging color map on a matrix plot

I want to use the color function "RedBlueTones" and I want to center the map at a number. Then I want to blend in the red direction of I am greater than that number and blend in the blue direction if ...
154 views

### Time delayed evaluation of a function

I'd like to write a function that delays the evaluation of a function (say) $5$ seconds after I hit Shift+Return. Is this possible?