7
votes
2answers
159 views

How to define UpValues in a different context from within a package

I'm trying to create a function (in a package) to import a lot of data and create a symbol with UpValues to return specific results about the data. I've got it working fine in a regular notebook, but ...
1
vote
1answer
150 views

Factoring terms out of a polynomial

I don't do much algebra in Mathematica and was surprised to discover, while attempting to answer this question, that I had no idea how to factor out an expression from a polynomial. The question was, ...
0
votes
1answer
87 views

How to force Manipulate to use preserve control settings over successive evaluations

I have this Manipulate: Manipulate[Plot[Sin[a x], {x, 0, 2 Pi}], {a, 0, 3}] Now, I realize I had mistyped the expression and it's actually ...
5
votes
2answers
109 views
17
votes
5answers
4k views

How to draw an ellipse arc in 3D?

There is no Circle or Disk object in 3D. I quickly found a way to use Cylinder (thin lines, no faces, very flat): ...
5
votes
3answers
472 views

How do I save/export a list so that it can later be easily imported as a list again?

I have a couple of big lists (each of them contains elements that are themselves lists of two elements, i.e. an element of each list that I have is of the form {x, y}) that I want to save/export. ...
4
votes
4answers
271 views

Defining a pure function involving a function argument

I've got an expression involving x and y that I want to use as a MeshFunction: ...
2
votes
1answer
54 views

How to joint symbolic expressions together [duplicate]

I want to joint symbolic expressions together to create a another symbolic expressions. one way to do that is as follows: ...
3
votes
2answers
126 views

After executing MessageDialog[] how can I wait for it to close before continuing

After executing MessageDialog[] how can I wait for it to close before continuing? I want to popup up a message and wait for the user to hit OK before continuing. Is there a mechanism for this?
0
votes
1answer
70 views

Finding the right DeleteCases pattern for <<199>>

I have a list in Mathematica with several items like <<199>> and <<104>>, I would like to get rid of them using DeleteCases, but none of the patterns I ...
11
votes
3answers
941 views

Can Mathematica show me a fraction with a repeating decimal notation?

The value of 3/817 when expressed using the N[3/817, 100] shows me data without helping me see the repeating patterns: After I ...
3
votes
5answers
1k views

A question regarding 1 divided 243

Here is a problem due to Feynman. If you take 1 divided by 243 you get 0.004115226337 .... It goes a little cockeyed after 559 when you're carrying out the decimal expansion, but it soon straightens ...
0
votes
1answer
118 views

Why does show combined plots and graphics fail in CDF Player but not in Mathematica?

The question is, how might I get the following script working as a CDF demo of complex inversion in a circle? It works fine in my home edition of MMA 8 run on OS X Mavericks. When saved as a CDF file ...
2
votes
2answers
74 views

Using Table with arbitrary number of variables [closed]

Let $P=\{p_1,...p_n\}$. I would like a way to implent Table[Expression,{$p_1$,lim},{$p_2$,lim},...,{$p_n$,lim}] where n and lim are parameters defined by the user. Any ideas?
8
votes
2answers
580 views

How to choose the OpenCL device to use?

OpenCLInformation tells me that my computer has three available OpenCL devices. How can I choose which one to use for computations? How can I verify that ...
-1
votes
1answer
97 views

Ploting fourier transform [closed]

I want to Find the fourier transform of this graph. {ListLinePlot[hari, PlotRange -> {{0, 200000}, {-1.5, 1.8}}]} And when I Put: ListLinePlot[Abs[Fourier[hari][[2 ;; 100]]], PlotRange -> All, ...
1
vote
2answers
71 views

Simple derivative not working [closed]

I'm a complete newbie to Mathematica. I've been using Wolfram Alpha Pro as well as MS Mathematics for a few months but wanted to dive into using a more powerful tool. I'm having a problem with ...
0
votes
1answer
804 views

wolfram mathematica intersection of two surfaces [duplicate]

I use wolfram mathematica. There is a function of two variables which defines the surface z = f(x,y), the second surface is defined as z = const. How to find the line of intersection of these two ...
1
vote
1answer
188 views

Symbolic evaluation of the sum of KroneckerDelta

I want to evaluate this simple expression $$ \sum_n f(n)\delta_{mn} = f(m) $$ using this: Sum[KroneckerDelta[m, n] f[n], {n, Infinity}] However Mathematica ...
0
votes
0answers
26 views

Why I am not getting the same frequency when sampling a waveform? [duplicate]

I am trying to simulate the sampling of a waveform to then apply FFT Analysis to it. Here is the sample code I have now using a square wave: ...
0
votes
0answers
46 views

NIntegrate Issue: Changing integration limits makes calculation time extremely long

After a long time developing some code in mathematica and finally getting it to work, I have unfortunately encountered an odd problem: When I change the limits of integration (and shift the function ...
0
votes
1answer
108 views

Laplacian in D Dimensions

Is it possible to compute $\Delta F=\nabla^2 F$ for $F=F(x^1,x^2,…,x^D)$ with $D$ finite? I seem to be only able to specify spherical coorindates, for example, if I want to leave standard ...
2
votes
0answers
159 views

Smooth out contour in RegionPlot/ContourPlot

I would like to smooth out the jagged edges in the outermost contours in the following plot: I have data of values as a function of variables (x,y) in the form ...
-1
votes
2answers
88 views

Strange numerical integration result

I write a function called berrycur[kx,ky] which I will give at the end of the question, and want to numerically integrate this function over {kx, -2π, 2π]}, {ky, 0, ...
0
votes
2answers
76 views
0
votes
1answer
286 views

Rotation matrix $\to$ quaternion

I found a very good link about quaternions in Mathematica , but I don't know how to create a quaternion from a rotation matrix. Can anyone help me, please? Update I need this: A rotation may be ...
20
votes
2answers
652 views

How to get shadows in Graphics3D?

It was a shock to me when I found that in Graphics3D a surface is always transparent to the light sources: ...
31
votes
3answers
3k views

Data Table Manipulation in Mathematica

I am a statistician searching for an efficient way to select rows or columns from a table of data in Mathematica. Let me pose the question in 2 parts with a SQL-style table of data: ...
0
votes
1answer
67 views

Any command for group products?

Is there any Mathematica command or well known technique to take the direct product between two symmetric/permutation groups?
4
votes
2answers
139 views

How to obtain all the distinct De Bruijn sequences?

In combinatorial mathematics, a $k$-ary De Bruijn sequence $B(k, n)$ of order $n$ is a cyclic sequence of a given alphabet $A$ with size $k$ for which every possible subsequence of length $n$ in $A$ ...
13
votes
4answers
500 views

How to make a function with its own options as well as passing options to other functions [duplicate]

I have a function with many of its own options, but I would also like to pass options to subfunctions using the FilterRules function. Here's a simple example: ...
8
votes
1answer
162 views

Extract what symbol is set by SetDelayed, Set, TagSet, UpSet, SetAttributes, etc

One of the recent features of the Mathematica Plugin for IntelliJ IDEA (www.mathematicaplugin.halirutan.de) is a Structure View which let's you see information about several definitions that are done ...
6
votes
1answer
165 views

Different actions with dragging and clicking points in same graphic

On a graphic (in this example a simple plot), I need two points to move when I drag with the mouse, and these points must move to location {1,1} when I click on them. This is how I got it to work, ...
1
vote
1answer
38 views

Adding various combinations of rational expressions [closed]

as a newbie to Mathematica I wonder if someone can help... I'm generating a puzzle worksheet for some students and wish to add linear rational expressions, three at a time from a pool of six. e.g. ...
4
votes
6answers
467 views

Insert all elements from one matrix into another

I have two matrices $A$ and $B$ which are the same size. Each element of $A$ is a list of numbers. Each element of $B$ is just a number. How do I insert each element of $B$ into the corresponding list ...
0
votes
0answers
53 views

How do I constrain the result of fitting my non-linear model to be greater then 0

fitresulty21 = NonlinearModelFit[ydata21, {funfit[y, σ, A, B, x1, d, d/2], A > 0}, {{x1, 20}, {σ, 3}, {A, 200}, {B, 2000}, {d, 110}}, y]; ...
6
votes
2answers
150 views

Why the Mouse dragging response not as smooth as Locator

I am experimenting to use MouseDragged eventhandler to change the vertices positions of a triangle, it works, but not as smooth as using Locators. Is this the ...
3
votes
1answer
142 views

Collect terms in a sum

Suppose I have this expression ...
9
votes
5answers
1k views

Find intersection of pairs of straight lines

I have a list of 24 points, in which 2 consecutive points (1st and 2nd, 3rd and 4th, ...) are supposed to form a line. ...
0
votes
1answer
47 views

using 'steps' in Manipulate

I want to make a 3D shape move through a specified graph; e.g. y = Sin[x], such that it moves up and down. My working so far has ...
0
votes
0answers
103 views

How do I estimate the Pareto front in my multiobjective optimization problem?

I need to minimize a function of two parameters that gives two "stress" outputs {A,B} = f[tau,mu]. How do I estimate (even roughly), the Pareto front for this ...
2
votes
1answer
60 views

Solve[ ] for 2 variables not returning list of two variables

I type into mathematica: Solve[2 Sin[(Sqrt[3] x - 3 y)/2] == 2 Sin[(Sqrt[3] x + 3 y)/2], {x, y}] expecting it to return a list of pairs of solutions of the form ...
0
votes
0answers
31 views

How to calculate this derivative? [duplicate]

Can Mathematica do the following simple calculation? $$F(x_0, x_1, x_2, ...) \equiv \sum_n x_n^2$$ I want to do the symbolic calculation: $$ \frac{\partial F}{\partial x_m} = \sum_n 2 x_n ...
0
votes
2answers
85 views

Edit plot after creation [duplicate]

I try to find a way to manipulate a plot I created before. (for full code take the fuction x[t_]:=Sin[2t] ) Let's say I have a plot: ...
3
votes
1answer
46 views

Add rational linear expressions

I want to set work for my 17 year old calculus students and have access to Mathematica 7. I aim to create a worksheet with rational expressions which they will then decompose into partial fractions. ...
0
votes
0answers
40 views

Comparing NIntegrate with definite integration

I want to calculate without error a sum of double integrals with the following definitions for the functions within them: ...
0
votes
0answers
75 views

Why does this integral have a complex result

I wanted to find the normalization of distribution F2 . ...
2
votes
2answers
213 views

Measures of association, Concordant and Discordant

I want to calculate concordant and discordant pairs on nx2 tables. ...
0
votes
1answer
99 views

Cannot solve equation

I just started using mathematica and I'm facing a problem that I just can't solve. I want to solve the following equation: Code: ...
1
vote
1answer
102 views

How can I define a function that takes a list of reals?

I'm trying to define a function f which takes a list of reals. My purpose is to build a function which I can give a list of reals, integers or strings and have it ...

15 30 50 per page