# All Questions

72 views

### Powers of dimensionless quantities: is this a bug?

Today I came across the following behavior: Quantity[x, "Minutes"/"Minutes"]^-1 (* Quantity[1/x, (1/#1 &)[("Minutes")/("Minutes")]] *) It seems that ...
96 views

### Color Snapping When Using VertexColors with a Tube with BSplineCurve as an Argument

I think I've identified a bug in how VertexColors are treated when rendering a Tube object where the underlying data is a ...
71 views

### Generic templating system

I'm trying to implement a templating system in Mathematica, a bit like the List<List<T>> you would find in C#. Here's how it looks so far: ...
78 views

Consider: ...
129 views

### Family of Lines

I need to draw a family of lines connecting (a,0) and (0,b), where a+b=2, and determine an equation for the envelope of this family of lines. I need to do this in mathematica and don't know where to ...
71 views

### Label of Ticks are overlaying

I have a little problem that's driving me crazy. The problem will be clear from the graphic: the text of the tick labels. on the Y-Axis are crossing/overlaying. I tried everything but I found nothing ...
47 views

### Using Check[] on multiple statements

I am using a loop to run run multiple fits. If a fit fails, I don't want it to either appear in my data or to affect later fits so I am using the Check[] function to catch if any errors occurred (I'm ...
277 views

### Extruding a wierd 2D shape to make a prismatic 3D shape

I have the outline of a 2D shape defined by a periodic radius R[θ]. I would like to extrude this linearly to a prismatic 3D object that has my cross-sectional ...
80 views

### How to draw a 3D Plot with non-numerical axes?

I've got a CSV file that looks like this: c1,c2,m1,m2,m3 'a','b',1,0.5,4 ... 'x','y',10,100,4.21 Where c1 & ...
280 views

### How to plot functions in multiple coordinate systems

I´m curious if is it possible to plot in: A. two different Cartesian coordinate system who share the same plane but have different origins and rotation. The visualization should preferably resemble ...
352 views

### How to force Return[] to return from an arbitrary point (like in C++)?

I need to test some complicated conditions to calculate a Return value. But MMa doesn't let you Return[] from anywhere the way C++ does. The structure of my Module is similar to this: ...
262 views

### Implementing the Golden Section Rule

I am attempting to write a code which brackets the minimum of a unimodal function, using the Golden Section Method Below. I am have serious issues debugging my program though, any help will be ...
52 views

### How can I rename the local kernel without causing issues?

I would like to name my kernels. However when I remove "Local" Mathematica becomes unstable, sometimes crashes sometimes doesn't initialize correctly. Is there something special about the name ...
134 views

### Expressing a series formula

I want to generate a series of the following kind in Mathematica: $\quad \quad a(n+1) = a(n) + ({\rm prime}(n+1) - 1)/2 \quad \mbox{for odd primes},$ so that the resultant series is ...
137 views

### Trying to write my own Greedy/ Nearest Neighbor Algorithm

So I'm trying to write my own function and compare it to the results I have from using FindShortestTour. Does anyone know how to find the distance from each city to each of the others without ...
49 views

### Strange evaluating indication of output cells

Something like this happened when I was working with two Manipulate cells. I saved the notebook, duplicated it and only keep these two cells, and opened the ...
410 views

### Generating animations of clouds with Mathematica

I'd like to generate some visually-pleasing animations of clouds, fog or smoke with Mathematica. My idea of "visually-pleasing" is along the lines of one of the images on the Wikipedia article for ...
57 views

### Mathematica doesn't italicise a function's argument in the function's body if it appears in the denominator and the denominator is edited. A bug?

Bug introduced in 10.0.0 and persisting through 10.1.0 or later I'm using Mathematica 10.0.2 for Mac. On a fresh kernel, I type this: a is not italicised ...
221 views

### Integrate using \[Esc] int \[Esc]

I like writing integrals symbolically instead of using Integrate[]. I suddenly seem to not be able to do this and am confused. I type \[Esc] int \[Esc] then ...
150 views

### Why wrapping this ContourPlot inside a Manipulate changes its output into something unrecognizable?

I am a bit puzzled: I wrap the same exact ContoutPlot inside a Manipulate, and it looks all wrong (I don't know what it's drawing but it does not look like the zeros of my polynomial). What am I doing ...
135 views

...
105 views

### Solving fifth order polynomial equation [closed]

I am trying to solve this equation: 1/s^3 + 3s^2 + 4s + 1 But I am not able to solve it. A little help would be appreciated. P.S: I am new to Mathematica and I ...
250 views

### How I can make the StreamPlot of this differential equation?

I need the StreamPlot of this differential equation but I don't know how. dp/dt = 0.4 p(1 - p/30), 0 <= t < 5 and 0.4 p (1 - p/30) - 0.25 p, t > 5
47 views

### FourierSinCoefficients extremely slow

I'm just playing with Fourier decomposition of periodic functions. We had a similar example with standing waves and cosines in class, so I tried to expand a triangle wave in sines. This is what I came ...
193 views

### Adding annotations to plot with vertical leader line to the curve

I am working with some GPS data for a bike trip I am going on. All the routes are given so it's easy to simply follow the line on your GPS. I am looking for a way to visually summarize information ...
67 views

### Exchange variable value between Mathematica and Autohotkey script

I have a script written with AutoHotkey and would like to send some data to and from Mathematica. For now I am using the CopyToClipboard[] function in Mathematica ...
155 views

### Read a compressed ascii data file?

I would like to write a filter for Import to handle data files that are generated by LabView in the LVM format. This should be straightforward, since the format is ...
83 views

### Block works when directly used but not when used in a function

I want to calculate a derivative such as: $\delta f=\sum_{i=A,B} \sum_{k=1,2,3} \frac{\partial f}{\partial a_k^i}$. Since $a_k^i$ are assigned values other places in the code, I have used ...
51 views

### ParallelSubmit and WaitNext: check if a job is done before calling WaitNext

Say I process something with ParallelSubmit: LaunchKernels[] job = ParallelSubmit[1 + 2] ParallelDeveloperQueueRun[] Then, I will use ...
150 views

### find position of nearest nonzero element in an array (functionally)

Given an array sel and an index position i0, how can I find the position of the nearest (left or right) nonzero element? I'm ...
91 views

### Combined ListPlot3D using arrays of different length

I have three parts of a ListPlot3D that I would like to combine. The problem is, the middle part has more points in one dimension than the other two, which means I can't combine them easily to plot ...
45 views

### aborting at a message, but still save data

This may be an easy question, but I can't find it anywhere. I have a code which solves linear equations in a do loop (possibly compiled) using LinearSolve. To save the results I use Reap and Sow. It ...
93 views

### No connection to WoframAlpha with v10.1

I have a problem with my connection to WolframAlpha with the new version 10.1. And I can't figure out what causes it, because it works with version 10.0. Also, I have a connection to the data ...
278 views

### Contour Integration along a contour containing two branch points

I need to compute following contour integrations: $$f(u)=\oint_\alpha dz \sqrt{z^3+z+u} \qquad ; \qquad g(u)=\oint_\beta dz \sqrt{z^3+z+u}$$ In which $\alpha$ and $\beta$ are two contours in ...
133 views

### Imaginary terms in the derivative of Jacobi theta function (2) on the real line

I am trying to calculate/plot the derivative of the second Jacobi theta function $d\theta_2(0, e^{-\pi t} )/dt$. Calculating or plotting the function itself works fine: ...
343 views

### How to make a 3d surface/point plot with color based on a list

This is my data: ...
288 views

### How to implement symbolic Ramanujan's summation in Mathematica?

How to implement Ramanujan's summation in symbolic form in Mathematica? For instance, I want as input the function $f(x)=x$, as output $-1/12$, as input $f(x)=1/x$, as output $\gamma$ (Euler's ...
203 views

### How can I create function which contains an ODE system and its numeric solution?

I have created a function like the following, which contains an ODE system. And I want to know the effect of different parameters. ...
223 views

### How to make multiple if statements?

I know Mathematica's if format is If[test, then result, else alternative] For example, this ...
76 views

### How would I go about simulating conditional random birth 100 times?

So I have the following scenario: Assume you have this organism that reproduces by itself. An organism either reproduces 0, 1, 2, or 3 organisms at a time. Assume they're asexual and reproduce only ...
96 views

### Manipulate excel file and plot

I have a number of .csv files that have the following format: I want to do the following: ignore the last two rows sort all the remaining rows w.r.t the 2nd ...
179 views

### How can I scrape the social network for a subset of users in Twitter?

Clearly one cannot scrawl the entire network... but I'd like to extract a statistically representative sample from the network. More specifically, I'd like to access the graph induced by scraping the ...
74 views

### SocialMediaData related functions don't save authentication data

Is there any way to stop SocialMediaData and ServiceExecute from making me re-authenticate every time? For example, say I have ...
117 views

### DiscretePlot - adjusting the scale on Y axis to log with prescribed spacing

I have this picture of a residual Plot I am trying to reproduce (Y axis scale should be the same as in my plot): The code I ...
120 views

### Transcendental Equation

After playing around with The Planck radiation law for the spectral energy density, (differentiation and setting equal to 0 to find the maximum wavelength"x") I'm stuck on how to deal with what I'm ...
96 views

### Real part of a sum

I would like to take the real part of the following expression: Sum[(a[i] + I b[i]) r^i/(r^2 + z^2)^i, {i, 0, 2 n}] where all of ...
166 views

### Plot axes are not exported to SVG properly in Mathematica 10.1

In the past, I was able to export Mathematica plots as SVG files with relative ease. However, when I tried to do this recently, I found that the text in the plot axes was rendered completely ...
131 views

### I can create an H2 database with the H2 Console, but I can't find the database with MMA

I can create an H2(Server) database using the tool that H2 provides, but although i can create a memory based H2 database with the Database Explorer, when I try to create a connection to the ...