1
vote
2answers
131 views

How to take input from user?

Since I'm new to Mathematica I want to have a Notebook which takes inputs from user and returns average of the inputs entered and plots it on x-y coordinate. How can I do this?
3
votes
1answer
251 views

Operations on a List of Vectors (Norm)

I have a List containing vectors. The coordinates are random numbers: r = {RandomReal[{-1, 1}, n], RandomReal[{-1, 1}, n], RandomReal[{-1, 1}, n]}; Now I want to ...
4
votes
1answer
188 views

Why to do parentheses change the results of a calculation?

I'm getting results that are sensitive to where I place parentheses with respect to operations that are associative1 (and should thus be insensitive to such placement). For example, if I define2 ...
0
votes
2answers
119 views

Matrix conditional operation

Say I have a matrix of: tmp1 = 5; tmp2 = 5; tmp3 = RandomChoice[{0, 1, 2, 3, 4, 5}, {tmp1, tmp2}]; MatrixForm[tmp3] How to do a conditional operation of elements ...
2
votes
0answers
481 views

Inconsistent boundary and initial conditions: BC ignored altogether

Consider the following diffusion-decay equation with von Neumann b/c in the origin and Dirichlet at the other boundary: ...
2
votes
1answer
702 views

How to define the Einstein summation convention in Mathematica?

How to define a Einstein summation convention in Mathematica? Say, how to let Mathematica know T[i,i] equals ...
8
votes
1answer
664 views

NIntegrate error bound

I am trying to evaluate a highly oscillatory integral using NIntegrate. I fear that due to limited resources (time and/or memory), I will not be able to evaluate the integral to the desired precision. ...
1
vote
1answer
84 views

How do I craft this constant to a specific accuracy?

An earlier post was migrated to Physics.SE and we determined that if this converged, we would have a constant close to the mass of the proton in kilograms. This constant is constructed by summing the ...
14
votes
5answers
626 views

Get number of combinations without “forbidden patterns”

I need to get the number of all combinations of binary digits in an 8-digit binary number, but minus some "forbidden" patterns like: xxxx0xx1 x1xxx0xx x1xxx0x0 ...
7
votes
2answers
2k views

Building matrices by attaching vectors (columns) and matrices

Having the need to attach a column to a matrix or to join matrices to make longer rows is an operation that I use very frequently and I find the Join function ideal ...
2
votes
1answer
395 views

Restrictions problem

I tried to program a simple linear optimization model and don't know where my mistake lies. The function should be a sum over "t" and "z" from the product of two constants ("e" and "H") and the ...
2
votes
1answer
144 views

#[[1]]//FullForm = 1?

I have a set of symbolic algebraic expressions that I'm trying to get some speed into. To illustrate the issue, I'll use a simple form like { k0 X, k1 Y, k1 Z}, ...
10
votes
2answers
265 views

Why is NeighborhoodGraph so slow?

To get neighboring vertices I first tried: gg = GridGraph[{10, 10, 10, 10}]; VertexList[NeighborhoodGraph[gg, 1, 1]] // AbsoluteTiming {5.539308, {1, 2, 11, ...
2
votes
1answer
222 views

How do I create a histogram out of this datastructure: x[i] = value_i?

Here is my SSCCE: a[1] = 2; a[2] = 3; a[3] = 6; Histogram[a] This throws and error though. Here are my questions: What kind of data type is a? Is it an ...
7
votes
3answers
394 views

Filter list based on date

What I would like to do is remove entries from a list of instrument data when it is in maintenance. The maintenance data I have is a series of dates which look like this; ...
1
vote
1answer
1k views

problem solving coupled second order differential equations using Dsolve

I have three coupled second order ODE's given as below $x''[t] = -c_1*y'[t]-c_2*z[t]-c_3$ $y''[t] = -c_4*x'[t]$ $z''[t] = \frac{c_5}{c_6}*x[t]-c_6$ where $c_i$'s are know constants. The ...
16
votes
3answers
747 views

3D view of a route shown on a map

You should have already seen such a thing, specially in documentaries about ancient life: the movement of a tribe is shown on an ancient map along a route with a dashed arrow. I want to do the same ...
2
votes
4answers
210 views

Extracting RHS from Rule

In an example from another question, the rhs of a list of rules can be simply extracted: ...
12
votes
4answers
1k views

Is there a way to hide or toggle the visibility of code?

Many of my notebooks have a similar repeating structure, which is very convenient and reliable for my workflow: a chunk of code defining a Manipulate for exploring ...
8
votes
1answer
124 views

Prevent Plus from threading InterpolatingFunction

For an InterpolatingFunction $y:\ \mathbb{R}\to\mathbb{R}^2$, Plus is unaware of this, so when I do any modifications to it in ...
3
votes
0answers
359 views

Ubuntu 12.10 no window focus on help browser

The help browser is not getting window focus when clicked on it. Clicking links or buttons in the help browser works without window focus, but copying code or typing in it doesn't. I can get window ...
2
votes
0answers
83 views

How do I create inline TraditionalForm expressions, and control their formatting? [duplicate]

Possible Duplicate: How to replace the style of the inline cell in a StyleSheet I'm trying to figure out the best practice for creating short, inline expressions that display as ...
2
votes
2answers
360 views

Plotting several numerical solutions plus the analytic solution of ODE in one plot

I want to be able to plot several numerical solutions of an ODE plus its analytical solution in one plot in order to see how the numerical solutions converge towards the analytical one w.r.t. the ...
24
votes
1answer
556 views

Reduce distances between vertices of graph to minimum possible?

This simple graph has vertex shapes of different sizes: ...
6
votes
1answer
336 views

Obtain Data points from a graph on an image without axes

I have the following image: (which is a oscillation of the "magnetic susceptibility of gold" in y-direction, in arbitrary units, over the "magnetic field strength" from bmin = 36540 Gauss to bmax = ...
2
votes
2answers
158 views

Updating a tracked symbol inside Refresh?

I have some code inside a Manipulate, whose goal is to allow the user to edit the upper half of the matrix while keeping it symmetric at all time. The minimal code ...
2
votes
1answer
87 views

Cleaning the hyperlinked string from its hyperlink property

I need to rename a number of files. These are graphic jpg files, and I have an Excel table in which the initial names of these files are collected. For example, this is the name of one of these files ...
9
votes
2answers
1k views

Convolution with interpolated function

I have some problems to calculate in reasonable speed the convolution of an interpolated function with a Gauss function. I have here (ExampleData.txt, alternate Pastebin link) data which I ...
2
votes
0answers
60 views

How can I focus cursor at specific position? [duplicate]

Possible Duplicate: Programmatically move the cursor to a desired location on the screen I made a Button with the name of "Click",if we have to click on ...
1
vote
1answer
685 views

How to scale vectors in VectorPlot?

I generated some pics from 2 datum,one in $x$ direction and the other in $y$,so I used the commands: ...
2
votes
1answer
148 views

Why do I have to install my stylesheet each time I make changes to it?

I gather that it should be possible to preserve changes to a stylesheet by simply saving it, but this is not the behavior I'm getting with a stylesheet I've "installed" using the "Install ...
1
vote
1answer
249 views

How do I define functions in TraditionalForm?

I'd like to be able to define functions (at least simple ones that Mathematica can otherwise understand) using TraditionalForm; but this seems to require the use of ...
5
votes
1answer
122 views

How can I remove a style from the list of available styles?

I have a stylesheet that has inherited some base definitions from another, but would like to "prune" the list of available styles, by removing or disabling1 some. Is there a way to do this? 1. This ...
9
votes
1answer
121 views

Is there a way to base one style on another?

I'm setting up a stylesheet and and finding the process of defining related styles tedious and error prone. In particular, I have several related styles that need to have synchronized settings (e.g., ...
8
votes
1answer
355 views

Integral with HeavisideTheta takes too long to evaluate

I tried to compute $$\int_{-1}^1 d x_1 \int_{-1}^1 d x_2 \int_{-1}^1 d y_1 \int_{-1}^1 d y_2 \theta(x_1 x_2 + y_1 y_2)\,$$ where $\theta$ is Heaviside's step function, by using ...
9
votes
3answers
414 views

How to remove accents from text?

I would like to know how I can remove accents from a string. For example, how can I transform "string test áéíóú" into ...
0
votes
2answers
207 views

How to get a sub range of a larger matrix?

This should be an easy question but I only found a partial solution using All. Say I have a matrix A = 1000 x 5, how to get only a part of that matrix, say B = n x ...
2
votes
1answer
156 views

Having Dynamic evaluated when off screen

As the title says, I want a cell containing the dynamic solution of a DAE-System to be available over the whole document. I use a lot of different Plots and Sliders scattered over the document and it ...
6
votes
2answers
1k views

NDSolve with vectors

I'm stumped. I'm trying to write this using vectors, but the 2nd derivative isn't being expanded like I expected it to be. This is a system of equations for a projectile with quadratic drag and ...
2
votes
3answers
1k views

Determining the local extrema of discrete data [duplicate]

Possible Duplicate: Local max/min of Mathematica data sets If I have a continuous function f (for example ...
9
votes
3answers
2k views

How can I differentiate Numerically?

Mathematica has two ways to integrate: Integrate and NIntegrate. But what about D? ...
2
votes
2answers
1k views

How to change the base of logarithmic-scale plots?

Mathematica provides a score of convenient functions to make plots with various logarithmic scale axes, for instance I am using ListLogLinearPlot to have a discrete ...
2
votes
1answer
322 views

Cournot Equilibrium

I'm trying to determine reaction functions of a Cournot equilibrium for $n$ firms using the same optimal condition, using the fixed point method. This is the method I'm using: ...
9
votes
5answers
418 views

Incrementing a number where each digit has a different base

Let's say I have a list, for instance {10,5,3}, indicating the bases for each digit of my 3-digit number. Using this basis, if I wanted to increment {8,4,1} a couple of times, here's what I would get: ...
2
votes
0answers
143 views
1
vote
2answers
552 views

Manipulating PlotRange

Currently, I am working with some dynamic simulations of mechanical/electrical systems (in this case a kitchen scale). The main simulation is running smoothly but while building a nice GUI around the ...
2
votes
0answers
68 views

How to expand terms within an integral? [duplicate]

Possible Duplicate: Why aren’t these additions of integrals and summations equal? I am trying to expand all the terms in a sum in order to apply assignment rules later, but can't figure out ...
4
votes
2answers
4k views

Simple ways to evaluate a derivative at a point?

The contrast in behavior between, say, f[x_] = Sin[x^2]; f'[2] vs. u[x_, y_] = Cos[x + y^2]; has always bothered my ...
4
votes
2answers
243 views

Both Sin[x]==0 && Cos[x]==0 as a solution

If I do FullSimplify[Reduce[Sin[p1] == 0 && Cos[p1] == 0, Reals]] I get Cos[p1] == 0 && Sin[p1] == 0 ...
13
votes
2answers
538 views

How to perform fuzzy lookup between lists?

I have two big lists with 10,000 lines each, with product names from different databases. They have a lot of common products (50%), but they are not typed in the same way. For example there is one ...

15 30 50 per page