2
votes
1answer
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 ...
0
votes
1answer
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 ...
8
votes
1answer
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 ...
13
votes
2answers
953 views

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

If you consider the following Polygon: ...
1
vote
1answer
83 views
0
votes
1answer
113 views

Contour plot show value change

...
0
votes
1answer
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. ...
17
votes
3answers
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 ...
0
votes
2answers
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 ...
0
votes
1answer
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 ...
0
votes
1answer
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 ...
0
votes
1answer
894 views

NotePad++ User defined language

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 ...
0
votes
1answer
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 ...
1
vote
1answer
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 ...
19
votes
2answers
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 ...
1
vote
1answer
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: ...
2
votes
1answer
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 ...
0
votes
1answer
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 ...
0
votes
0answers
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: ...
2
votes
2answers
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 ...
0
votes
0answers
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 ...
0
votes
1answer
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 ...
1
vote
2answers
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 ...
3
votes
3answers
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$. ...
4
votes
3answers
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 ...
0
votes
0answers
97 views

PDE combined with ODE 1D

I try to solve the following system of PDE coupled with ODE: $$\theta_t - a\theta_{xx} + b\kappa_a(\theta^4-\varphi)=0,$$ $$-\alpha\varphi_{xx} + \kappa_a(\varphi - \theta^4) = 0,$$ $$-a\theta_x + ...
1
vote
3answers
132 views

Simple question about AxesLabel

I am plotting a function and for labeling the axes I use: ...
1
vote
3answers
84 views

Question about plotting one function with different colors [duplicate]

How to plot a function with different colors. I want to plot the function x^3-x with distinct color. For example, using red from -1.5 to 0 and using green from 0 to ...
-1
votes
2answers
73 views

Question about plotting

I have to plot this graph http://i.imgur.com/hf54aiT.jpg I tried Graphics[{Circle[{0, 0}, 3, {-2Pi, 2Pi}]},PointSize[.025]] I don't know how to proceed from here. ...
0
votes
0answers
58 views

Need to parallelize function f in a iteration

I don't have experience using Mathematica for parallel calculation. I need to do something simple to parallelize the calculation of f which is calculate each time n iterates: ...
0
votes
0answers
113 views

Financial Derivative european call option

When estimating financial derivatives like a european call option there is a parameter named: dividend paid per time unit. What does this mean, I have not been able to find any more information about ...
0
votes
1answer
138 views

Select positive value from a vector

I am wondering how to pick out the positive Omega value from soln, and make these positive values into a row vector. I know how ...
2
votes
1answer
217 views

Mathematica script - Using front end

I'm running Mathematica on OS X and I want to create an Automator action that converts spreadsheet files. I have written this script: ...
0
votes
1answer
189 views

Plot a solid generated by a family of surfaces

I'm trying to graph a series of planes as a solid object in Mathematica. I first tried to use the Plot3D options as well as the fill options to plot a $3D$ volume, ...
4
votes
2answers
262 views

How to count the number of n-gons and line intersections in an image of a complete graph?

I would like to count the number of line intersections and number of n-gons in a complete graph (which forms a regular polygon). The only way I've come up with that would allow me to do both in ...
0
votes
1answer
82 views

How to discriminate Weatherdata latitude and longitude from a more detailed list

From this list of weather data how can I discriminate only latitude longitude for each station? For example from the following sample I would need only the coordinates: "50136","","Aoluguya|Mohe, ...
0
votes
1answer
90 views

How to format output when using Manipulate

As in the title, I want to output the image of a 3D body with its volume and surface area shown nicely beside it. (Maybe in a table?) But how can I do it? Is it possible to calculate the surface area ...
1
vote
1answer
138 views

Working with means and variances

My goal is to work out on the following equation: $$Mean(P)(1-Mean (P))\left (h + (1 - 2 h) (1 - \frac {Var (P)} {Mean (P) (1 - Mean (P))}) (1 - Mean (P)) + \frac {Var (P)} {Mean (P) (1 - Mean ...
0
votes
1answer
83 views

Problems with For statement

I'm trying to iterate some expression through for loop: ...
1
vote
2answers
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: ...
0
votes
1answer
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 ...
5
votes
0answers
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 ...
2
votes
1answer
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 ...
0
votes
1answer
170 views

Mapping a function over n levels

I want to map a function over a matrix of rank n, for example: ...
1
vote
0answers
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 ...
3
votes
1answer
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 ...
0
votes
1answer
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 ...
15
votes
0answers
170 views

Exp is slower for some number ranges

I get a hit on performance with the Exp function depending on the range of my inputs. for example, with: ...
5
votes
2answers
120 views

What is the syntax to conditionally suppress plotting in version 9?

In Mathematica 7 it is very easy to conditionally suppress plotting of individual lines using If: ...

15 30 50 per page