6
votes
1answer
227 views
10
votes
5answers
2k views

Best way to create symmetric matrices

From time to time I need to generate symmetric matrices with relatively expensive cost of element evaluation. Most frequently these are Gram matrices where elements are $L_2$ dot products. Here are ...
5
votes
1answer
471 views

How to symbolically differentiate an infinite series without evaluating the series itself

I'm dealing with finite sums of infinite series. Each of the infinite series possesses a different starting index, i.e. each of the series begins at n = 0, n = 1, or n = 2. As a result, it's important ...
14
votes
4answers
474 views

Returning an unevaluated expression with values substituted in

Let's say I have a function formula[x_List] := (x[[1]] - x[[2]]) + (x[[3]] - x[[4]]); and I want to pass it a variable and get back the unevaluated formula with ...
5
votes
3answers
694 views

Can't compute definite integral

Consider a scalar field (in polar co-ordinates), $f(r) = l-r$. Now I want to evaluate the field integral over a circular region of radius $b$, centered at a distance of $x$ from the origin. According ...
3
votes
1answer
165 views

Pattern matching a multivariate derivative

I can extract the parameters of a single variable derivative with the rule D[f[x], x] /. Derivative[order_][fcn_][variable_] -> {order, fcn, variable} ...
9
votes
3answers
818 views

How do you round numbers so that it affects computation?

I'm trying to make a demonstration of how rounding to different numbers of digits affects things but I can't find a way to round numbers to a specified number of digits. The ...
10
votes
3answers
272 views

Problems Computing (in a reasonable amount of time) Solutions to a System of Inequalities

For my Cryptography research I am interested in finding solutions to the following inequalities in terms of $r$ and $s$, where $p$ is some fixed constant. $$\begin{align} 2^{p - s + 4} + 2^{p - r} + ...
13
votes
4answers
1k views

Reflect a Plot Object

I have a relatively simple operation I'd like to perform on a plot: I would like to reflect the plot across the x-axis. I do not have any tick labels, so making sure that the labels are not themselves ...
-2
votes
2answers
1k views

Plotting a parametric plot of two functions

I have two functions f1(x) and f2(x). I want to plot them such that f1 is on the axis of ...
6
votes
2answers
179 views

How to access off-cell mouse position inside an EventHandler?

Consider the following example. First, I print the dynamically updated value of the actual position of the mouse, then I print pt, which is the same but is only ...
5
votes
2answers
361 views

Inserting a jpeg image at a specified point in the XY-plane

I know how to import an image into Mathematica using the Import command. The original image can come from anywhere, but call this image "myimage" after importing ...
8
votes
1answer
550 views

Why does Export drop namespace prefixes in the exported XML file?

I am trying to generate an Excel-compatible XML file from Mathematica. First, I created a test XML file by saving a Microsoft Excel workbook as "XML Table". Then I ...
5
votes
0answers
375 views

Having problems compiling Mathematica Cuda code

Ok I am trying to follow the examples of Cuda Code in the docummentation Run the CUDAQ[] and get back a True and run some of ...
8
votes
5answers
331 views

TableAlignments -> Left not working

For a very simple dataset TableAlignments->Left does not work: ...
2
votes
1answer
154 views

how to deploy notebook into player pro

I want to ask how can I deployMathematica notebook into player pro. I know that online conversion to Mathematica player pro is ...
6
votes
4answers
502 views

Convert head Times to List

I can convert an expression with the head of Times,for example, 12*12.5*13*13.5*14*14.5 to {12, 12.5, 13, 13.5, 14, 14.5} by ...
3
votes
3answers
333 views

Help on evaluation control?

I want to plot series of slopes: x, 2x, 3x, 4x, 5x, 6x... I'm trying to do this: ...
4
votes
2answers
346 views

How can one popup menu be used to add another?

I'm trying to construct a GUI that changes depending on what's chosen in certain popup menu's. For example: The default state of the menu is condition one, but when the first PopupMenu is selected ...
6
votes
1answer
568 views

Using a user defined Mathematica package with MathLink

I'm trying to create a Java program that uses some methods from a mathematica package I've defined. When I run my java program though the output of the program acts as though the Mathematica methods ...
4
votes
1answer
234 views

Symbolic bit vectors

I'd like to see how addition and xoring bitvectors mix together. To do this, I implemented (a primitive) vec_add and vec_xor: ...
4
votes
1answer
393 views

Tooltip for a ListPlot3D

I am getting stuck with figuring out how to use Tooltip for a ListPlot3D. Basically I have a list of values for the 3D plot (no ...
4
votes
1answer
292 views

How to perform DialogInput operation within Button

Can someone clarify how to perform a DialogInput operation within a Button? I wrote some code for that but it's not working. ...
18
votes
3answers
595 views

Creating DotPlots

I've been struggling to create a DotPlot like the one shown in Cleveland's The Elements of Graphing Data. Using the following dataset ...
4
votes
1answer
416 views
8
votes
1answer
410 views

Mathematica File Organization

Last year I asked how to integrate notebooks to the documentation center in stackoverflow. Back then I was only interested in seeing those notebook and being able to search for them. Unfortunately, it ...
4
votes
1answer
208 views

Evaluation inside Button stops after some seconds

I would like to trigger a long calculation inside a dynamic module with a Button. It seems that the evaluation stops without an error-message after some seconds. I made a test outside the a dynamic ...
1
vote
2answers
306 views

solving for one solution to a system of polynomials

I'm trying to solve a system of equations: ...
13
votes
2answers
670 views

Mathematica Sec and Csc

How can I prevent Mathematica from using the "old fashioned" functions "Sec" and "Csc"? In Germany these functions are "old fashioned" as they are not taught anymore at school.
3
votes
2answers
311 views

What is the command to find function invariant?

What is the command to find function invariant? http://demonstrations.wolfram.com/AFunctionInvariantUnderAGroupOfTransformations/ what is algorithm it use to calculate this? Edit there is a book ...
4
votes
4answers
582 views

How to change color dynamically?

I am new to Mathematica and want to change the FillingStyle Dynamically in this Plot. I want ...
4
votes
2answers
683 views

expanding a polynomial and collecting coefficients

I'm trying to expand the following polynomial ...
4
votes
1answer
398 views

How can I regulate 'Play sound duration' in Mathematica 8

How can I regulate the time of play sound[s] - duration in Mathematica 8. I want to import and save wav file in *.nb document & manipulate (with) the sound duration, for example, select sound ...
16
votes
4answers
806 views

How to fill in an irregular border of an image

I have the following code which draws a graphic, and colors the regions in it different colors: ...
20
votes
1answer
310 views

How can I easily eliminate the dependency of a stylesheet on a non-built-in stylesheet?

As per discussion here: User A has a notebook that uses custom definitions from styles.nb. Now user A passes the notebook to user B. The styles do not show up for B because B does not have styles.nb. ...
5
votes
1answer
3k views

More on combining 2d and 3d plots

This is a spin off/follow up to Can 2D and 3D plots be combined so that the 2D plot is the bottom surface of the 3D plot boundary? ... Following Sjoerd's method, I did this: ...
2
votes
2answers
144 views

Custom function not returning any output

I'm trying to write a custom function but it isn't returning any output. Here's my code so far: ...
43
votes
1answer
1k views

Profiling from Mathematica

I've always wished I could do some profiling like you get in Wolfram Workbench, but directly from Mathematica, without using or having Workbench. If it is possible, how can I do it?
0
votes
1answer
198 views

TimeConstrained[] not taking full amount of time

I am using Mathematica to evaluate an integral within a given time constraint. Note that I have read in values of 'BigList' or BL from a file. If the file has a ...
5
votes
1answer
940 views

When do I use Mathematica, when do I use Gephi, and how do I use them together?

Mathematica has great operations for analyzing graphs but when the graphs are a bit bigger, Gephi seems to be more efficient (at least on my computer) at drawing and analyzing, i.e. visualizing the ...
0
votes
3answers
307 views

Setting the Accuracy of calculations

I am optimizing an equation that involves a number of trigonometric functions and Exp[]. How do I make sure that all my calculations have an accuracy of 120-200 ...
17
votes
3answers
728 views

Using pure functions in Table

I need a table with the elements made of pure functions and list elements. This is a simplified example: I need a list as: ...
7
votes
2answers
1k views

How to create a rectangle wave (duty cycle $\ne$ 50 %)?

I'm trying to use phase-shifted SquareWave[] functions to create a rectangle wave: ...
9
votes
2answers
211 views

Can RecurrenceTable make use of CompiledFunction?

I'm trying to implement a discrete-time 2D Verlet algorithm for a point-mass subject to a softened gravitational interaction as a test for a more computationally intensive simulation using ...
5
votes
1answer
229 views

Display Log with desired notation in output

I wish to display logarithms with different bases in the single-term rather than numerator/denominator form during output: ...
20
votes
4answers
621 views

Defining functions in stylesheets

Is there a way to define functions in a stylesheet? So far I have managed to write my stylesheets without the need to use my own custom functions or definitions. For instance, maybe I have some color ...
11
votes
1answer
447 views

Using ANOVA with a “Repeated measures” / “Within-subjects” design

Repeated measures designs or "Within-Subjects" designs are very important in live sciences and social sciences. Unfortunately, Mathematica's ANOVA package is not able to analyze those designs. It only ...
5
votes
3answers
282 views

Highlighting text with StringReplacePart but also using Style, Subscript

For a Natural Language Processing analysis task it's desirable to highlight a text string programmatically according to XML tags that reference specific words or phrases. The XML tags specify the ...
8
votes
1answer
693 views

RegionPlot (or FillingStyle) using hash lines? [duplicate]

Possible Duplicate: Filling a polygon with a pattern of insets I have a RegionPlot (and sometimes a regular Plot) where I'd like to shade two different parts of it two different ways. Since ...
14
votes
4answers
2k views

Problems specifying number of bins in Histogram

So I wanted to create a Histogram with a custom number of bins. Luckily there is a simple function for this in the form of Histogram[data, n] where n specifies the ...

15 30 50 per page