# All Questions

178 views

### Loop in solving multiple matrix calculation

I am wondering is there a way to use loop, like Do, For, to rewrite the last line in the code. I tried to use ...
94 views

### RSolve works slow and does not give an analytical solution for solving high order linear difference equations

RSolve@@{{a[n]-a[n-10]==101}~Join~Table[a[i+1]==101+10i,{i,0,9}],a[n],n} I want to get the exact form of general formulas, but ...
281 views

### Why do Tooltips slow down Dynamic so much? Is there a faster alternative?

I'm working on a Dynamic ListPlot with a few thousand plots, and it seems that wrapping the points with Tooltip slows the Dynamic responsiveness substantially. With the simple example below, dragging ...
953 views

### Rebuild a polygon so it doesn't self intersect [duplicate]

If you consider the following Polygon: ...
83 views

### Plotting a parametric graph and a normal one on the same grid with a legend option

Here is my simple code: ...
113 views

...
130 views

### Trouble plotting a function constructed using NIntegrate and FindRoot

Here is my code: ...
112 views

### Finding intersection and graphing

1) How do I find the intersection of f[c_] := y^2 - 2 x^2 (x + 3) == c ((y + 1)^2 (y + 9) - x^2) between the plots of f[0] and f[2] I tried plugging-in numbers. ...
811 views

### How to make a pie chart using custom image

Can we make a pie chart using a custom picture? For example, consider this image of one cent coin: I would like to use this image and cut pieces out, depending on data, and also make a clickable ...
221 views

### Symmetric function of the roots of a polynomial

First, I'm a beginner. I can compute the sum of roots with the follwing: Roots[x^7 + 5 x^6 + x^5 + x + 1 == 0, x] Plus @@ (x /. {ToRules[%]}) // Simplify Of ...
54 views

### Copy big or small values to $\LaTeX$

When I create a DistributionFitTest of a distribution I receive very low P values, e.g. $2.456750213008007 \times 10^{-367}$. When I copy this (by right clicking and copy to $\LaTeX$), and insert it ...
33 views

### How to output local variables when error message is generated without interrupting evaluation?

I am running a calculation to generate a dataset. I use several iterations to sweep over a parameter space. A few times an error message is generated (which is not the problem per se). Is it possible ...
894 views

I know there is a xml file with language for Mathematica notebook (nb or m files). The link is http://sourceforge.net/apps/mediawiki/notepad-plus/?title=User_Defined_Language_Files Now I want a xml ...
66 views

### Optimizing repeated function calls

Easiest way to keep my library nice, is to naively call some functions many times with same parameters. Doing so prevents from zoo of (library-)global variables and complicated initialisation ...
54 views

### Replicability of RandomVariate within a function?

I have a rather basic question but can't figure out a foolproof answer. In the following code, I build a function which returns the mean difference between successive elements of a vector created from ...
2k views

### Animation of double pendulum

Sadly, I am a completely newbie. I am studying Physics and in our theoretical physics class we got the task to solve the double pendulum using Mathematica. We just got the program, but no introduction ...
87 views

### How to create a column for ordering values

I have a dataset, where some data has to be ranked in regard to the number of ranking of the total dataset. I've made a simple example below: ...
74 views

### Generating list of functions from list of expressions

I know how to create a function from concrete expression like Function[{x, y}, x^2 + y^2] But what if I have a list of expressions list1 and I know the set of ...
174 views

### Zooming into Parametric Animation Plot that Uses InterpolatingFunctions

I have an interplanetary trajectory solver that calculates a spacecraft route from Earth to Mars, and I am trying to zoom into the spacecraft when it reaches its Mars intercept orbit but am having ...
31 views

### Table of values for functions with random variables [duplicate]

I'm trying to get a table of values for functions with random variables. First of all, i have a function like that: ...
131 views

### Using a variable for two different purposes

I want to name a bunch of tables after the OEIS entries which describe them. Is there any way to use these names for both the table name and the link at the same time? The second line uses the ...
48 views

### Social Media Data, specifying the time interval

I am facing a problem concerning the SocialMediaData function built in Mathematica. I am trying to investigate the WallMostLikedPost over time, i.e I want get the most liked post for the last few ...
141 views

### Help using NIntegrate

I need some help with NIntegrate. I pasted the code that I wrote below; I know that up to "de" is correct. What I would like to do is NIntegrate de w.r.t phi{0,0.1} and curlE{-10,10}. The final ...
91 views

### Manipulate which creates and deletes Manipulators dynamically

I want to plot a function in a Manipulate in which the number of terms varies and a Manipulator for the coefficient of each term ...
217 views

### Can Mathematica solve $x^{b^2} + ax^b -1 = 0$ for $x$ with $a>0$, $b>1$?

I have a problem that I can't seem to solve neither analytically nor with Mathematica. Namely, I have the expression $$x^{b^2} + ax^b - 1= 0,$$ which I want to solve for $x$ with $a>0$, $b>1$. ...
177 views

### Using Mouseover to change the appearance of a button without writing the button specification twice

When I code in Mathematica, I often find myself having to repeat large chunks of code for a function to work. The latest example of this is a color changing button that prints when clicked, code shown ...
97 views

83 views

### Problems with For statement

I'm trying to iterate some expression through for loop: ...
235 views

### A fast way to compare interval

I have a list of intervall. Some of these intervals are disjoint, some are overlapped and some are included in others. To leave no ambiguity about my explanation, you can see the following examples: ...
225 views

### Factor vector out of a matrix

I am wondering how to factor a[1],a[2],...,a[4] out of sim so that I can write sim as the ...
141 views

### How can I make sure that 3D plots have the exact same orientation and viewpoint?

First off, I apologize that I can't come up with a simpler working example, but I only seem to have this problem with the larger examples. I am trying to make animations, using functions like the ...
295 views

### How to see source code of a demonstration in notebook [duplicate]

I downloaded this demonstration The source code can be previewed here However, when I download the NB file, I cannot get access to this said code. All I can see is the output. I'm obviously missing ...
170 views

### Mapping a function over n levels

I want to map a function over a matrix of rank n, for example: ...
54 views

### Hashing by Equals instead of SameQ

I have some numerical code involving complex numbers representing points on a plane. Some of these are equal but not identical, ie ...
358 views

### Transforming a huge rectangular table to Sparse Array

I am interested in the most efficient way to transform a huge rectangular array to a sparse array structure. Consider a numeric rectangular table that is rather sparse, with zero positions being set ...
245 views

### Plot3D Not Showing plot

I have a function that I'm trying to visualize and for some reason the plot only shows a small snippet of the graph of the function. The function, d, and relevant ...