# All Questions

685 views

### Elegant way to map a function to only the last element of each sublist [duplicate]

Suppose that I have the following list, called test: test = {{{a1}, {a2, a3}}, {{b1}, {b2, b3}}, {{c1}, {c2, c3}}}; Now ...
307 views

### How to Compute Aggregate Best and Worst Cases for a Large Number of Estimates?

I need to aggregate multiple estimations, but I haven't been able to find a built-in function in Mathematica that aggregates multiple probablity estimations (I am specially interested in estimations ...
9k views

### How to find the domain and range of a function with Mathematica?

I'm studying calculus and in some exercises I am asked to find the domain and range of a function. Does Mathematica have already a built-in function for this? I can imagine some ways of doing so, ...
5k views

### Creating custom functions with multiple arguments

I am hoping that this isn't a stupid question so feel free to vote it for closure. Google failed somehow. I want to define a custom function (more complicated than the usual ...
134 views

### About minimizing calculations when using ComposeList

I have a lot of functions to use in a iterative way, and I need some of the calculation results. For example: ...
453 views

### Assumptions with D

I want to give assumptions for the D function. Say I want to calculate $\frac{d|x|}{dx}$ for $x>0$, which is 1. I write ...
2k views

### How to plot an inequality?

I need some help in plotting the following inequality using Mathematica: $$\frac{1+(x/100+0.1)\times y/100}{1.15+1.15\times(x/100)\times(y/100)}\geq 1$$ assuming $x,y\in \mathbb{Q}$, the set of ...
1k views

### Define parameterized function

I would like to be able to define the gain function of a system from its parameters. Specifically, I'd like to define a function that accepts two inputs, call them $b$ and $w$, and returns a function ...
621 views

### Prepend 0 to sublists

My question is similar to this one, but my goal is to prepend a single 0 the each sublist, not incrementally many 0's. The file I'm working is a CSV containing around 50K sublists of length 35. I've ...
1k views

### ImagePadding or other means of getting whitespace when the PlotLabel is a Column or Grid

I have been having problems with exported plots cutting off a pixel or two of the text in the title of my plots. Let's assume we have some data (AR(1) noise with a high autoregressive parameter ...
335 views

### Strange result when integrating BesselJ functions

Consider the following integral: ...
307 views

### Two-sided slider getting stuck

I'm implementing a two-sided slider to be able to set upper and lower bound in just one slider: The problem is that it can get stuck when both locators are at the far left: And I'm unable to ...
2k views

### Selecting elements from a list one by one

I have an list: l = {{4,5},{7,8},{9,5},{3,2},{1,2},{13,12}}. I want to take the elements in the list in the sequential order. For example the first element in ...
395 views

### Selectively clear DownValues

How can I clear a subset of a symbol's DownValues ? For example, suppose I have created some DownValues for $f$ like this: ...
274 views

### Is it possible to make the Button execute two or more actions?

According to the help: Button[label,action] Is it possible to make the button execute two actions?
2k views

### FeynArts not working properly

So I have installed all FeynArts folders (from 3.5 to 3.7) with FeynCalc 8.0.1., and none of it is working properly :\ First I load the path to specific FeynArts package (3.5 for instance), then, by: ...
548 views

### import complete date string to mathematica

Based on an example from here I try to parse dates from a table including the time, but it fails. This is the modified example: ...
825 views

### Solution of numerical vector equation

Suppose I have a vector equation: Y'[t]==rhs[Y[t]] and Y[0]==ConstantArray[0,n] where "rhs[Y[t]]" is a black box function ...
2k views

### Epilog->Inset crops text with large font sizes

Why does Epilog->Inset crop the first and last letters here ("a" and "g") when FontSize is set to large values (which varies ...
1k views

### Optimizing an energy functional in mathematica using variational calculus

I have an energy functional which I want to optimize using calculus of variation. It would be nice if someone could please post a working example using mathematica. The procedure is as follows, ...
1k views

### Getting an InterpolatingFunction from a ContourPlot

I have a function, say minimizeme[Ω_][β_][ϵ_] = ϵ^2 Ω - Log[2 (Cosh[2 β] + Cosh[2 β ϵ])]/(2 β); I want to find its critical points in $\epsilon$ for a given ...
284 views

### How to nest my own “times” function to get powers

I have a "times" function. I'd like to create a power function using it. It should look like this for an 6th power: ...
3k views

### Rescale axes (e.g change from Hz to THz)

I have multiple plots of permittivity against frequency, but they're hard to read because the frequency labels go from 4x10^14 to 1x10^15 in Hz. I want to label the frequency with THz instead of Hz, ...
1k views

### How to process .vtk file

I want to extract the cluster of points inside 3D box, is there any way one can do this in Mathematica?
1k views

### Is it possible to export a graph as graphic to Excel?

It is straightforward to export lists to Excel with Export. Can I export a graphic image, too? This does not work: ...
505 views

### How do I run scripts on networked computers directly from Mathematica?

The answer to an earlier question, Computers running Wolfram Lightweight Grid Manager won't fall asleep, left me with a new problem. To review, I have a computing environment comprised of: 27" ...
754 views

### Randomly selecting elements without repetition

I assigned energy values to each element in the array as per the program of Verbeia. The program looks like this ...
121 views

### What are some general strategies to avoid using For loops? [duplicate]

Possible Duplicate: Iterating over lists in Mathematica While there are some cases where a For loop might be reasonable, it's a general mantra – one I ...
1k views

### Assigning a particular value to array elements

I have an array of 10000 elements. I want to randomly assign energy to these 10000 elements using Gaussian or Exponential distribution, such that each time a particular element is selected its energy ...
1k views

### How can I open an Excel file and modify it in Mathematica?

I wanted to ask how can I view an Excel file from a Mathematica notebook and modify it. I have seen a similar question, Open Excel file with Mathematica, but the answer involves .NET. Is there any ...
450 views

### VectorPlot: How can I evaluate the vector field by clicking on the plot?

This seems like a basic feature that is somehow missing. Ideally we'd get something like a tooltip which shows the x,y position where I click (or of where the mouse is currently hovering) and the ...
2k views

### Matrix multiplication in Block Form symbolic calculation by Mathematica

I have a problem which requires taking product of two $10\times10$ matrices. I would like to do it by considering both matrices as $5\times5$ matrices such that each entry of both matrices is actually ...
1k views

3k 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 ...
2k 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 ...
206 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 ...
1k 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 ...