8
votes
1answer
783 views

How to apply a permutation to a symmetric square matrix?

Given a symmetric square matrix, how can I apply a permutation to the rows and columns (i.e. the same permutation to both the rows and the columns) such a way that the new structure of the matrix ...
5
votes
3answers
319 views

Centrality measures for single nodes

I am producing a graph, generated by a list of adjacent nodes. (The list looks like {1 ->583, 1->2977, 2->14, 4->1293, 5->221, ...}. Each node of my ...
3
votes
3answers
904 views

Changing variables algebraically

Suppose one has two functions, $y(x)$ and $z(x)$, and one seeks to obtain $y(z)$ by substituting $x(z)$ into $y(x)$. Can this be done in a single step? Or must $z(x)$ first be inverted independently? ...
2
votes
1answer
1k views

Mathematica Can't Evaluate This?

I am trying to find the inverse function of $\frac{\ln{x}}{x^2}$ in Mathematica. I am using the Solve[] function to find the inverse (yes, I know about ...
7
votes
4answers
1k views

Bold face formatting for vectors instead of overarrows like latex \mathbf{}?

OverVector can be used to make a symbol look like a vector in text sections of documents. I happen to like bold symbols for vectors better, as in latex ...
5
votes
4answers
526 views

How to repeatedly show variations on a plot

I would like to show graphics repeatedly with changes in parameters. Neither of the following show anything. Nor do they give an error message. ...
4
votes
3answers
263 views

Brackets in output make unable to use output to identify matrix element

I'm trying to write a code where each matrix element swaps with a randomly selected neighbor (cardinal directions only) to redistribute the matrix. So far I've been able to replace an element with its ...
11
votes
1answer
2k views

Kramers-Kronig in Mathematica

I am trying to calculate the change of the refractive index from the change of the absorption coefficient using the Kramers-Kronig relations, in Mathematica. ...
6
votes
1answer
813 views

Formatting output of OpenAppend[] to match what Export[data,file,“.csv”] would output?

I have a large data set that gets exported to a .csv file. Export[data,filename,"csv"] is extremely fast and formats the data in a nice JMP-friendly manner. ...
12
votes
3answers
440 views

Considerations when determining efficiency of Mathematica code

I have two segments of code that do the same thing and I want to determine the which is more efficient. What are the considerations when determining efficiency of Mathematica code? ...
12
votes
2answers
933 views

How do I find the elements in a list that return the highest value for a function?

Suppose we have a list of values and a function f. I want to find which of the elements maximizes the return value of the function in Mathematica. Let call the ...
12
votes
1answer
541 views

Customize front end to add notifications when evaluation finishes?

Is it possible to add some customization code to the front end, so that when all cells have finished evaluating, some user code can be run? Background: I'm currently running some Mathematica programs ...
1
vote
2answers
2k views

How do you define the domain of a plot?

How do you define the domain of a plot? For instance, if I want to plot a standardized bivariate normal density function (with $r=0$), how do I specify the domain to be $[-3,3]$?
7
votes
3answers
491 views

Reading from a stream of strings and numbers delimited by commas

I am trying to read from a stream of strings and numbers delimited by commas similar to the way I have read from a stream of strings and numbers delimited by spaces. Example delimited by spaces ...
1
vote
0answers
103 views

is there an equivalent of “show” steps? [duplicate]

Possible Duplicate: Get a “step by step” evaluation in Mathematica In wolfram alpha, when preforming for complicated integrals there's a 'show steps' option that explains how ...
8
votes
3answers
300 views

How to write a function-defining function which stores the function arguments in a stack?

I have a function-defining function SetAttributes[DefFn, HoldAll]; DefFn[f_[args___], body_] := f[args] := body; I am trying to modify this function to record ...
5
votes
2answers
168 views

How change order of items added to the Palettes menu?

After installing an add-on package (Spin) in $UserBaseDirectory/Applications, there is now a new palette for that package listed on the ...
4
votes
1answer
169 views

HITS centrality

I want the centrality measure of a particular vertex in my graph, and for Closeness, Betweenness and Degree centralities I have been using : ...
36
votes
1answer
2k views

Adaptive sampling for slow to compute functions in 2D

EDIT: Although I have posted an answer based on my current progress, this in incomplete. Please see the "open issues" section in the answer. Most plotting functions in Mathematica adjust the ...
7
votes
1answer
692 views

Extracting coefficients from a partial differential equation

Frequently, I come across the following problem: How to rewrite a complicated partial differential equation in a more clear way? I would like to create some order by collecting terms that are equal. ...
12
votes
2answers
492 views

Saving a notebook without output lines

Is it possible to change the way Mathematica saves so that Out[] lines are never included? I have a .nb file that processes a ...
7
votes
1answer
162 views

How to sort cells in a notebook based on cell tags?

Suppose I have a notebook with cells tagged with both numbers and words with numbers always list first, and some cells without cell tags e.g.: ...
3
votes
0answers
107 views

ErrorListPlot marker missaligned with error bar [duplicate]

Possible Duplicate: Point Renderings Slightly Off in Mathematica I'm using the ErrorListPlot function in the ...
9
votes
2answers
249 views

MouseAppearance and cursor problems

I have to create a Graph object, which can be manipulated by the user, though I do not want to have the Graph-specific cursor ...
22
votes
3answers
2k views

How can I embed a Manipulate (or other interactive graphics) in my website using CDF?

The new CDF (computable document format) lets you embed a Manipulate or other interactive graphics on your website, and users can play around with your little ...
13
votes
6answers
929 views

Splitting up delimited data in lists

One task that I frequently find myself doing in Mathematica is splitting lists into lists of sublists, using specific elements to define the break-points. This is particularly useful with imported ...
12
votes
1answer
991 views

Error checking and trapping techniques with Throw and Catch

Mathematica provides several mechanisms for checking arguments and trapping errors in a function definition. Typical methods are : Definitions with argument patterns, definitions with ...
12
votes
4answers
334 views

Arranging connector lines

Heike gave an absolutely wonderful answer to my question about arranging subplots around a main plot and including connector lines. This is the result: Starting from Heike's answer, what is the ...
14
votes
1answer
746 views

Release the web camera after using CurrentImage[]

CurrentImage[] will capture an image from the webcam. It is even possible to create a live video in the notebook using ...
4
votes
2answers
470 views

Switching off Dynamic updating on a cell by cell basis

Is there a simple way to switch off Dynamic evaluation for a particular cell? I usually delete the cell if it disturbs other evaluations or affects the performance ...
7
votes
1answer
199 views

DiracDelta attributes

Is there any reason why DiracDelta isn't a NumericFunction but DiracComb is? I just ate a ...
11
votes
1answer
199 views

Manipulate[] inside DialogInput[]

I would like to get input from an interactive dialog that uses Manipulate[]. But I find that my Manipulate[] breaks when I put ...
8
votes
1answer
626 views

How to add vertex/edge labels to existing graph

If I have already created a graph using Graph. Later, I want to add to the graph some vertex and/or edge labels, how can I do that? Thank you.
16
votes
4answers
936 views

Subplots with connector lines

I am looking for advice from people who have more experience in this area on what is the best (simplest, least effort) way to create a graphic like the following: This is a rough mockup made in a ...
0
votes
1answer
177 views

Generate Chaotic Time Series using CellularAutomaton[]

If possible, How could I generate a chaotic Time series using CellularAutomaton[]. I am especially interested in Rule 30. A friend told me it was possible but I ...
0
votes
1answer
274 views

How to distribute definitions when loading external *.m packages

i'm struggling with the following. I use ParallelTable and it works transparently as it automatically distributes the needed definitions. However, I run into ...
5
votes
3answers
580 views

Retrieving the ImagePadding in absolute units

Consider the following graphic: g = Graphics[Circle[], Frame -> True, FrameLabel -> {"one", "two"}] Retrieving the ...
21
votes
1answer
453 views

Is there an equivalent of FullGraphics for Graphics3D?

For 2D graphics, there exists the function FullGraphics to turn the stuff Mathematica generates automatically on Graphics (like ...
7
votes
2answers
218 views

How can I get the list of dates in the next $n$ years

How can I get the list of all dates from today 21.02.2012 (which is a palindrome) up to say next $n$ years? Then finding the other palindromes are not difficult. I could not find an easy way to ...
5
votes
3answers
437 views

Show[] combines my Graphics3D objects in an undesirable way

Thanks to those (Heike, Jens, MrWizard, and R.M.) who helped me yesterday with figuring out how to plot an EM wave. Now I am running into trouble with the Show ...
10
votes
2answers
408 views

Move the cursor in a notebook using the keyboard

How can I move through a notebook using only the keyboard? If one tries to use the arrow keys, the cursor tends to get "trapped" in comments and error messages.
5
votes
1answer
402 views

Using physical dimensions in Mathematica DSolve

I would like to calculate a system of two differential equations in Mathematica using DSolve, like: ...
12
votes
1answer
622 views

Kernel Management

I would like to run a computation in one NoteBook that will take 2 hours. Could I assign this Notebook a specific Kernel so I can run computation in other Notebooks ?
15
votes
2answers
553 views

Automated testing for compatibility with older Mathematica versions

I have several packages which I actively develop and maintain. I try to stay up to date with new releases of Mathematica and usually update within a couple of months of a new version coming out. As a ...
2
votes
1answer
692 views

A combination of Set::setraw and Set::shape errors

Please consider the following toy code: ...
15
votes
3answers
607 views

Measure a DensityHistogram[] pair similarity

I study human vision and more specifically eye-movements. "If we display 2 symmetrical patterns (20 min one after the other), will our gaze distribution be symmetric is my research question." The 2 ...
3
votes
3answers
161 views

Simplifying already defined symbols

Consider the following code: ClearAll[x, y] x = y; y = 2; ?x ?y This will store $x$ being equal to the variable $y$, and $y$ having the value of $2$. Now switch ...
8
votes
2answers
583 views

What causes Manipulate to stop evaluating expressions?

I'm working on a N-body simulation within Mathematica, and currently I have something along these lines: ...
3
votes
1answer
209 views

Avoid crash in recursive Dynamic

With the following Dynamic cell, I can reproducibly crash Mathematica, so do not try this unless you have saved all your work! ...
14
votes
1answer
240 views

How to make a function like Set, but with a Block construct for the pattern names

How can we define a function that works like f[x_]=ComputeSomething[x] and treats x as a variable that does not have a value? ...

15 30 50 per page