2
votes
1answer
193 views

How do you define an affine transformation that is translated by itself?

This one should be simple, but I can't figure it out. I would like to define a transformation (function) such that $r$ maps to $m.r + r$ The help file on AffineTransformation says that ...
10
votes
4answers
789 views

Plotting a complex valued function over a circular region

I would like to apply some complex valued function to some region in the plane, say, a circle of radius $R$ centred at $k$. How can I do this?
8
votes
3answers
369 views

Where in the documentation can I find a list of function argument types?

Recently, I learned that it is possible to assign "types" to function arguments in the definition of a function. Suppose I have a function stringFun that does some ...
13
votes
7answers
375 views

Get the first element after the first sequence of length N of consecutively increasing values

I'm looking for an efficient way of extracting the first element after the first sequence of N consecutive elements in which the values are increasing. If these are the data of a toy example: ...
5
votes
2answers
360 views

How To Span Table Headings?

What I am doing wrong? I would like to get a header to the table and based on your code I tried this: ...
7
votes
1answer
604 views

How to map rotate, pan, zoom to manipulate controls

I am wondering if there is a way to restrict the motion of the rotate mouse cursor in when moving around a 3d plot. For example, I want the y direction of the cursor to correspond to pulling the z ...
13
votes
1answer
251 views

Problems with images caused by which stylesheet is used

Update This looks now like it was a bug in Mathematica version 8, because everything works as expected - at least for this minimal example - in version 9. (As an aside, I couldn't seem to find ...
8
votes
1answer
338 views

How do you insert more columns into Table cells?

How do you insert more columns into Table cells as shown below? To get to this table, go to File -> New -> Styled Notebook -> Textbook -> New -> Scroll down to the Table Cells.
4
votes
1answer
129 views

Tweaking Prime[n] to return 1 when n==0

I manually evaluate this cell to set Prime[0] Unprotect[Prime] Prime[0] = 1 Protect[Prime] I manually evaluate this cell to reset Prime[0] ...
7
votes
7answers
439 views

How to pick an element of a row corresponding to the minimum in a particular column?

How can I find what value in column 1 of my list corresponds to the minimum value in column 2?
5
votes
3answers
336 views

ComplexInfinity/Indeterminate error when evaluating derivative

Motivation: I want to find the coefficients for the polynomial that is obtained when one adds together the first $n$ natural numbers to the power of $a$; that is, when you consider $1^{a} + 2^{a} + ...
3
votes
3answers
518 views

Converting a string containing whitespace-delimited numbers to a list of numbers

Suppose I have a string str that contains only whitespace-delimited real numbers: ...
3
votes
1answer
377 views

Handing a list of constraint expressions to a C++ function with MathLink

I need to solve an optimization problem, which is defined in a Mathematica notebook. Using Mathematica's FindMinimum is not an option, because it is too slow. So, ...
13
votes
2answers
296 views

How to make use of NumericQ[x] = True (and use it safely)?

Basic Issue: I'm trying to understand the proper use of NumericQ's "magical" capabilities. Please consider the examples below. Actual question and some links are ...
11
votes
1answer
490 views

Formatting and printing lists with Mathematica scripts

I'm just starting out with Mathematica and I'm using MathematicaScript rather than the GUI. However, I'm having trouble formatting a list when printing it. Suppose ...
5
votes
3answers
284 views

How to force Dt[ ] to recognize dependencies

I want to differentiate a function f[] for which I don't have a specific expression. f[] depends on ...
3
votes
1answer
282 views

Increasing the tickrate of an ErrorListLogPlot

I'm new to Mathematica and am trying to do an ErrorListLogPlot using the "ErrorBarLogPlots" package (from the Wolfram Library) for a graphical evaluation. ...
8
votes
3answers
599 views

Variable variable names

I have two variables, $ u \in \{0,40\}$ and $\gamma \in \{0,1\}$. I take $10$ values of $u$ and $5$ values of $\gamma$ and using their combinations as a pair of input parameters, I perform some ...
8
votes
2answers
270 views

Manipulating OptionsPatterns[]

How do you combine OptionsPatterns? For example, I would like to have a function that can take both options that I specify, and options for all graphs: ...
3
votes
1answer
170 views

Efficiently keeping elements in a list (an input list) that exist in another list (a keep list)

I have some code that generates lists of integers (one such list is called, for example, inputList). I also have a "master list" of integers that should be kept, ...
7
votes
1answer
267 views

How to wrap this dynamic code inside a Manipulate?

My goal is to set up a Ising-type simulation, where many fast simulation steps are done in the background, and a visualization of the current state is displayed as the simulation evolves, being ...
12
votes
3answers
2k views

How to use FindFit to fit an implicit function?

Now I am trying to fit some data with a implicit model function. Firstly, I tried a toy example. Toy example with input and output ...
19
votes
3answers
377 views

Nested definition: How can I define a function with a passed-in expression?

Here's a simplified version of what I'm trying to do: ...
13
votes
1answer
399 views

What strategies can I use to evaluate a limit when Limit[] returns unevaluated

I'm trying to find the following limit using Mathematica: $$\lim_{N\to\infty}\sum_{k=1}^N\left(\frac{k-1}{N}\right)^N$$ The problem is taken from here and is known to converge to ...
11
votes
3answers
1k views

Correcting a correlation matrix to be positive semidefinite

Does Mathematica have a way to "fix" a correlation matrix that is not positive semi-definite? I looked through the documentation and search the internet but could not find anything.
23
votes
6answers
2k views

Convert an expression to a Function

I need a function which can take an expression and return a pure function based on the symbols in the expression. The symbols might have values so must be protected from evaluation. It is probably ...
6
votes
1answer
587 views

How to turn a random graph into a matrix

I have constructed a random graph with Mathematica using the RandomGraph command. Now I would like to convert this graph to a matrix, but I don't know how. The ...
7
votes
2answers
260 views

How to Rasterize in “Printout” style

I am trying to ascertain how large a justified text block will be when printed by rasterizing it in the "Printout" style environment. However, ...
1
vote
1answer
173 views

How can I make CDF which uses user defined function

I have a user defined function which is called many times in the code. I want to ask that when I am deploying the code toCDF, I need to define that user defined ...
4
votes
3answers
376 views

Table in a Legend

Calculated data: ...
3
votes
2answers
552 views

How to avoid this kind of numerical error caused by extreme parameters when using NDSolve?

Here I use a one-dimensional heat conduction equation as the example. I found that when the thermal diffusion coefficient is small enough, Mathematica will give a result against the second law of ...
8
votes
2answers
380 views

Series expansion with irrational power

I need the series expansion of a fairly nasty function and its derivative: ...
7
votes
1answer
1k views

Probability and distribution from actual data

Let's say I have some data from a real world system: ...
13
votes
1answer
870 views

How to find out available fonts from within Mathematica?

How to find out available fonts on the system from within Mathematica? When I do Style["foobar", FontFamily -> "Foobar"] how do I know which font the ...
0
votes
1answer
912 views

How to add a grid on Plot, ListLinePlot and ListPlot? [duplicate]

Possible Duplicate: How to insert guide-lines in graphics without specifying range? When we're using ArrayPlot, it's possible to draw a grid by doing: ...
10
votes
1answer
564 views

Automating FTP upload within Mathematica?

I have MMA-generated html and would like to automate uploading to a named directory to a web host via SFTP or HTTP POST, ideally without creating local temp files. The closest question I could find on ...
4
votes
1answer
194 views

Help with Permutations

I am currently trying to generate a list of permutations of length 2 of elements of a list of strings. For example: ...
3
votes
1answer
284 views

Can I create a dynamic number of rows in TabView through an iteration?

I have written code, with the help of stackoverflow of course, and I want to make it user friendly so that other people in my lab can use it. I'm playing with DialogCreate and similar functions. I ...
6
votes
2answers
1k views

Windows IME Chinese blocking shortcut for ctrl + space

I currently use the Windows IME on Windows Vista to allow myself to type Chinese characters (not in Mathematica), and by default typing CtrlSpace switches between the English keyboard and the Chinese ...
3
votes
1answer
274 views

Extraneous Keyboard Shortcut for ctrl + '^' in Mathematica 8

I would like to use the keyboard shortcut Ctrl^ to enter a superscript. I have tried to type this two different ways, and each time i have gotten an undesirable result. According to the file ...
1
vote
1answer
214 views

Particular solutions of a Differential Equation not evaluated in a given case

Below first case which gives particular solutions of an OED correctly: ...
3
votes
2answers
475 views

Calculate with units

If I want to calculate with units, for example using Pythagoras theorem, I would do this: c = Sqrt[(3m)^2 + (5m)^2] The result will be ...
4
votes
1answer
682 views

Draw tangent to point in ListLinePLot

I am using ListLinePlot to draw a number of points to a graph: ...
2
votes
3answers
230 views

Plotting function lists [duplicate]

Possible Duplicate: Difference in Plot when using Evaluate vs when not using Evaluate Why do I have to put Evaluate[] here Why is ContourPlot not displaying this curve? Why is nothing ...
7
votes
2answers
335 views

How to see the 'source code' of DockedCells? ALT: How to 'show expression' of DockedCell?

Here is a CDF file with the dockedcells toolbar (at the top). I'm trying to see how he created and positioned the logo, the formatting buttons, table of contents, etc, through a source code of it, but ...
1
vote
2answers
188 views

How to compare the InputField values in For loop dynamically

I am using a For loop for printing five InputFields. The loop gets its values from the variable tx. I want to compare the values ...
21
votes
6answers
1k views

How to improve the performance of solutions to Project Euler (#39)?

This is the problem 39 of Project Euler, which I asked in the chat room two days ago. My original code runs as slowly as snails, and finally I got two answers from JM and Rojo. Unfortunately, both of ...
1
vote
1answer
152 views

How to collect q[t] from the following integration

As shown in the following program, the q[t] in a can be collected from the integration by defining the integration of ...
4
votes
1answer
368 views

help with dynamic input

I'm trying to build a pop up window with i lines. Each line would read: Number of neurons in layer 1: Number of neurons in layer 2: etc until layer i The user would enter a numeric value on each ...
6
votes
2answers
2k views

How to mark visible points on a Plot3D?

I'd like to illustrate a two-variable function discontinuous at zero. The function is $f(x,y)=xy/(x^2+y^2)$ unless $x=y=0$, in which case $f(0,0)=0$. I thought that I could draw a plot and then mark ...

15 30 50 per page