# All Questions

7answers
5k views

### Sizing cells in a GraphicsGrid/GraphicsRow

I would like to add a colour bar to a plot. I tried to use GraphicsRow for this. In a GraphicsRow, each item is given the same ...
4answers
579 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. ...
1answer
857 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 ?
2answers
635 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 ...
4answers
493 views

### How does string interpolation work in Mathematica

I've noticed that Mathematica 8 seems to have some kind of string interpolation feature, but I couldn't find any documentation on it and I can't figure out how it works. For example, if I enter ...
1answer
2k views

### Simpler way of performing Gaussian Elimination?

Is there a simpler way of performing Gaussian Elimination other than using RowReduce? Such as a single built in function? Edit: Look at the example from our simulation class. Not too difficult, but ...
1answer
460 views

### How to execute kernel command from Front End?

Documentation for Yuri E. Kandrashkin's OptionsExplorer package says to add the following menu commands in MenuSetup.tr: ...
3answers
518 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 ...
1answer
829 views

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

Please consider the following toy code: ...
2answers
877 views

### Creating a realtime MIDI Out

I have a live stream of notes and note velocities using SoundNote and SoundVolume. My problem is that I have no idea how to ...
2answers
481 views

### Local variables

I'm trying to use Modules together with functions. tmp2 = x^2 + 1; f[y_] := Module[{x = 1}, Evaluate[y tmp2]] This works when ...
1answer
302 views

I've put Eric Weisstein's Hyphenate.m package in $UserBaseDirectory/Utilities; installed the requisite ... 3answers 167 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 ... 1answer 220 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! ... 5answers 4k views ### Computing eigenvectors and eigenvalues I have a (non-sparse)$9 \times 9$matrix and I wish to obtain its eigenvalues and eigenvectors. Of course, the eigenvalues can be quite a pain as we will probably not be able to find the zeros of its ... 4answers 1k 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 ... 1answer 4k views ### Visual Studio Express 2010 on x86-64: libcmt.lib missing The CCompilerDriver documentation explains that to use visual studio express on 64-bit targets, it's necessary to install the windows SDK after installing visual studio. I have done this, first ... 1answer 617 views ### What is the best way to clip a graphic to a region? What is the best way to clip a graphic to a certain region? Here's a very simple implementation to show what I mean: ... 1answer 457 views ### Using physical dimensions in Mathematica DSolve I would like to calculate a system of two differential equations in Mathematica using DSolve, like: ... 4answers 713 views ### How to automate a FrontEnd return? I use some custom shortcut keys in KeyEventTranslations.tr. One is for the Delete All Output function: ... 2answers 1k views ### Creating Plots for a Family of Solutions I am wondering how do you set the parameters appropriately for$a_n,\,\alpha,\,\text{and }b_n$to plot the family of solution of:$u_n(r,t) = [a_n\cos(k_n\alpha t)+b_n\sin(k_n\alpha t)]J_0(k_nr)$... 1answer 274 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? ... 5answers 4k views ### How do I plot a plane EM wave? I would like to display an electromagnetic (EM) wave. I have written code that works, but it does not "shade" the area between the graph and the axes. Both the ... 2answers 995 views ### Keeping Text Size the Same Throughout Entire Notebook File Is there a way in which when you choose to format the size of the font within your notebook, for a particular cell, when you go into another cell, the default size font (12pt) will not be ... 1answer 362 views ### Symbolic Optimisation I'm trying to solve symbolically the following optimisation: $$\min_{q_uu}\ \Biggl[ q_u q_{uu}\psi B_{uu} + q_u q_{ud}\psi B_{ud} + q_d q_{du}\psi B_{ud} + q_d q_{dd}\psi B_{dd}$$ $$+ ... 3answers 5k views ### Product of elements within a list Please Consider : list={{5,2,6},{2,8,3}} I need to get the product of all the element within list : As of now I do this : ... 1answer 990 views ### Using .NET 4.0 from NETLink Using Mathematica 8, I can check the version of the .NET framework used by NETLink as follows: ... 2answers 4k views ### Delete the current notebook cell using the keyboard Is there another way than pressing Ctrl+. until the whole cell is selected and then pressing Del? If this is not built in, can I create some sort of a global macro to do this and bind it to a ... 1answer 739 views ### Hankel Transform integrals won't work in Mathematica I'm trying to do this integral, which is shown on the Wikipedia page on the Hankel transformation:$$\int_0^{2\pi}\mathrm d\varphi\;e^{\mathrm im\varphi}e^{\mathrm ikr\cos(\varphi)}$$The answer is ... 4answers 6k views ### How do I save a variable or function definition to a file? Is it possible to save a function which was created via Interpolation of some data in such a way that I can use this function in a new Mathematica session without ... 2answers 734 views ### Is it possible to use the LevenbergMarquardt algorithm for fitting a black-box residual function? I have a black-box multiargument multiparametric function of the type SRD[dataPoint_List,params_List] which accepts experimental data along with the parameters of ... 2answers 5k views ### Implementing efficient multiple undo At the time this question was asked, version 10 was not out yet. The Front End of Mathematica 10 does have multiple undo, see the answer by John Fultz. The Mathematica Front End's built-in Undo ... 0answers 524 views ### Changing FrontEnd automatic scrolling in version 8 In Mathematica versions < 8, the FrontEnd has a very intelligent behavior: On evaluation, it by default automatically scrolls down the Notebook window to the last printed Output cell but also ... 1answer 300 views ### How to work around incorrect tooltips in plots exported to HTML This is an issue that I always wanted to investigate but haven't gotten around to solving yet: The tooltips for contour lines in a plot like this can be very useful in the Notebook interface: ... 5answers 2k views ### Using implicit differentiation to find a line that is tangent to a curve at a point A few days ago I asked about using differentiation to find a line that is tangent to a curve at a given point. J.M. provided a very elegant way to solve these kinds of problems in Mathematica. Now ... 2answers 273 views ### How can you stop ordering of InputField entries? I have: InputField[Dynamic[d]] Dynamic[d] If I enter e.g. a b x^5 h m the entry automatically gets sorted, as per screen ... 2answers 1k views ### How can I change the keyboard shortcut for switching the active window? The default keyboard shortcut (on Windows at least) for switching focus to the next window is Ctrl+F6, and for switching to the previous windows it's Shift+Ctrl+F6. How can I change this to Ctrl+Tab ... 1answer 443 views ### Get the neighboring vertices and incident edges from a vertex in a graph I need to get the neighboring vertices and incident edges from a vertex in a graph. I assume NeighborhoodVertices can be used for the former. Anything better? Or ... 1answer 907 views ### How to write a function to add edges or vertex to a graph I need to add either a vertex or an edge to a graph, and also sometimes, vertices or edges, or a mixture of the two. How to write a function for this? 2answers 772 views ### Efficiently collecting results inside a compiled function When we don't know the number of results that will be generated, the usual way to collect results is Reap/Sow. Another ... 8answers 2k views ### Injecting a sequence of expressions into a held expression Consider the following toy example: Hold[{1, 2, x}] /. x -> Sequence[3, 4] It will give Hold[{1, 2, Sequence[3, 4]}] ... 3answers 645 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 ... 7answers 1k views ### How to Derive Tuples Without Replacement Given a couple of lists like a={1,2,3,4,6} and b={2,3,4,6,9} I can use the built-in Mathematica symbol ... 2answers 346 views ### Visualizing several long lists of numerical information to see relative frequency Mathematica has very powerful visualization techniques. However, I'm at a loss at how to best make the following chart readable. ... 4answers 1k views ### What is the fastest way to locate an image inside a larger image? let b = let c = How to do: find[c,b] that returns the bounding box of c in b? ... 3answers 972 views ### Passing down arguments In R, one can use ... to pass arguments down to another function. For example ... 6answers 9k views ### How can this confetti code be improved to include shadows and gravity? Here's some confetti: ... 4answers 6k views ### Using FindFit to fit$a\,b^t$: how to avoid introducing complex numbers? I'd like to find a model$f(t)=a\,b^t$which matches the following data ... 3answers 1k views ### Calling IronPython code from Mathematica I'd like to call some IronPython code from Mathematica using .NET/Link. The problem is that the code lives in .py files, yet from Mathematica I can only load .NET assemblies which are DLLs. So it ... 3answers 246 views ### Transform vector with lag Say I have a vector$Z_n$with and I want to transform it into another vector using this formula:$X_t=Z_t+0.7Z_{t-2}$The problem is that I am not quite sure how to get that$t-2\$ lag in there. I ...

15 30 50 per page