4
votes
1answer
83 views

Why do certain fractional values in TriangleWave not evaluate?

While answering another question I discovered that TriangleWave does not automatically evaluate when given certain fractional values, specifically fractions with a ...
9
votes
2answers
218 views

How to avoid an expensive subset of a Manipulate computation when dependent variables have not changed?

I have a Manipulate where a portion of the calculation that ends up displayed is dependent on a subset of the Manipulate control ...
1
vote
2answers
87 views

ListPlot : range from $0$

I want to plot values of a table for example: table = {0.456, 0.7899, 1.3456, 9.8908} But I want to Plot points (x,y) like: ...
0
votes
0answers
56 views

analysing data with MLF using (Oracle) Database connection

I'm testing the MLF package in Mathematica for datamining purpose. I start the databaseconnectivity with the following code: ...
0
votes
0answers
20 views

Incorporating Built-In Function Options/Parameters into Shorthand [duplicate]

Shorthand syntax provides an alternate way to apply functions and, in many cases, improves readability. A simple example would be ...
0
votes
1answer
88 views

How to distinguish expression from zero [closed]

my question is the following. I have an array, which elements are functions (say, sines of symbolic arguments). Some of the elements are zeros. I want to write code like: ...
2
votes
0answers
73 views

Limit[Sum[(2*E*n)^w/(w^(n/2+w)), {w,2,n}],n->Infinity]

I would like to show that the following (and other similar formulae) tends to zero. Limit[Sum[(2*E*n)^w/(w^(n/2+w)), {w,2,n}],n->Infinity] What's the right ...
-1
votes
1answer
111 views

Adding a textfield to the function that I implemented

Adding a textfield to the function that I implemented to represent the tangent or derivative of a function, but I've added so mark errors. ...
0
votes
0answers
25 views

Threading a single abscissa through a list of ordinates [duplicate]

Suppose that I have the following list, called list. list contains elements X, ...
1
vote
2answers
164 views

Expansion with binomial coefficients

How can I get binomial coefficients in expansion of $(n x+i) (1+i x)^n+(n x-i) (1-i x)^n$, where $i=\sqrt{-1}$ and $n$ is an integer. I have no idea how to coax Mathematica to do something remotely ...
0
votes
1answer
52 views

Reap/Sow: strange behavior with tags and functions [closed]

I was trying to use strings as tags for Reap/Sow and I've found out the following strange behavior when I also add a function as the third argument of Reap[]: ...
3
votes
2answers
204 views

How to make slider in/visible in Manipulate?

I need your help with making a slider invisible and visible in a Manipulate. Here is my code: ...
0
votes
1answer
39 views

Replacing character in position

I'm trying to use Mathematica to make some work on binary data, and I'm missing something. Consider the string "111". I want to flip the last bit to become ...
0
votes
1answer
23 views

Is it possible to modify the options for a particular cell from another cell? [duplicate]

I was wondering if I can toggle the "CellOpen" state from a cell (or bunch of cells) from another cell. i.e. I am imagining having a manipulate command along the lines of: ...
0
votes
2answers
125 views

NDSolve boundary query / Extracting values from solution

I have a function $O_{2}$ with boundary conditions $O_{2}(r_{o}) = p_{o} $ and $O_{2}(g) = O_{2}'(g) = 0$. I plot it using the solver code below; ...
1
vote
3answers
185 views

How to animate 3-D figure using sequence of data [closed]

I have four points in 3-D, I want to join the points with a line. The points move with time. So I want to animate the jointed Point in three dimensions. I try to use ...
0
votes
3answers
103 views

Partial products in prime steps [duplicate]

I am trying to find out partial products going up in prime steps for Euler's product formula $$\prod_{p} \frac{1}{1-p^{-s}}$$ Trying things like ...
1
vote
1answer
131 views

Is linear interpolation applicable here

From my understanding about Linear Interpolation especially of that of Newton's Divided Difference Polynomial, we could get the value of F(x) from the given set of ...
3
votes
2answers
95 views

Evaluate in Plot leads to function error

Please help - I'm really struggling to understand why this evaluates with errors. ...
0
votes
1answer
50 views

Extend a function defined for integers to a differentiable function of a real variable

Here is a function that calculates the probability of randomly landing on a Fibonacci number not greater than $n$: ...
2
votes
4answers
235 views

How to set magnification of image to 75%

Right click on an output image, choose magnification. There are 25%, 50%, 100% etc. But how can I set to 75%?
1
vote
2answers
176 views

Find the centre of FindGeometricTransform

I'm interested in using Solve[] to find the centre point of rotation (as an $x,y,z$ coordinate point) and axis of rotation (as a vector) from a ...
1
vote
1answer
233 views

Fitting data using a differential equation

I have data generated from two functions given below. How can I go about finding a fit of the form: y'[x] == -(a + b/(c + d y[x] + e F[x] )) where a,b,c,d,e are ...
0
votes
1answer
51 views

Mapping a function of two arguments where the 2nd arg has a fixed value

I create three random images: i1 = Image[RandomReal[1, {8, 12, 3}]]; i2 = Image[RandomReal[1, {8, 12, 3}]]; i3 = Image[RandomReal[1, {8, 12, 3}]]; I can scale a ...
6
votes
1answer
145 views

How can I define a ⊕ operator?

What is wrong with the following code? CirclePlus := SparseArray[Band[{1, 1}] -> {##}] & a_ ⊕ b_ := CirclePlus[a, b] SetDelayed::write: Tag Function in ...
0
votes
1answer
71 views

Solving polynomial equations takes infinit time

I need to solve an polynimial equation, but when i try to use Solve or NSolve in mathematica, its cant find the solution in appropriate time (i interrupted calculation after 5 hour left). The ...
0
votes
3answers
145 views

Solving algebraic equations

How may I make n and k in terms of x and y in this ...
0
votes
0answers
40 views

How to get shadow of a 3d object [duplicate]

Suppose that we have a box or a sphere or an other 3D object and a ponctual light source. How we can generate the cast shadow using mathematic? Is there any tools to render a shadow given the light ...
0
votes
0answers
14 views

Evaluating a String that is a Variable [duplicate]

I have a Variable assigned a value, say ImportantDocuments=1 How do I make N["ImportantDocuments"] evaluate to be 1 instead of ImportantDocuments I found that ...
4
votes
1answer
137 views

Passing Mathematica function via MathLink or LibraryLink to c (or c++)

I want to numerically solve the heat equation. To do so I wrote a program in C++ - It is a BVP $(\alpha T +\kappa \frac{\partial T}{\partial r}=f(t))$, where $f(t)$ is an arbitrary function, whose ...
0
votes
1answer
118 views

Why isn't Simplify completely simplifying my expression when it has all the necessary info?

I have a complex variable, and I'm trying to multiply it by its Conjugate[], which should give me a real number. So, I'm currently doing: ...
0
votes
2answers
133 views

Swap first and last names in a list

Edited to fix an inconsistency in the given example data format. I'm trying to write a simple function to load in a csv list of names which is formatted as "Lastname Firstname Initial " and ...
0
votes
1answer
151 views

PixelValue with pixel indices [duplicate]

How Can we use PixelValue with pixel indices?
19
votes
3answers
365 views

Why x = x doesn't cause an infinite loop, but f[x_] := f[x] does?

If I execute: In[1] := x = x Out[1] = x and then I evaluate the symbol x: ...
1
vote
2answers
194 views

Conditional range in a parametric plot

I have a program that needs to be done like this: ParametricPlot[ equation, If[x < 1, {x, 0, t}, {x, t, 2}]] But Mathematica didn't seem to recognize the ...
4
votes
2answers
170 views

Reduce with Integer domain, but receive a rational solution

I want to find the integer values $k$ so that D[f[x], x] has integer solutions. I tried ...
4
votes
1answer
61 views

Converting StringForm output to a string produces unexpected results

I want to compose a string that contains newlines, so I tried the following: ...
1
vote
1answer
102 views

How would I get the best quality plot into a TeX editor which includes the legends?

I have currently used "Save Selection As" after highlighting the graph and legend and then saved it as a PNG file, but the quality isn't brilliant. I am using TeXworks on Windows 7. The "Copy As ...
0
votes
0answers
86 views

Scroll bar glitch when entering full screen mode at magnifications higher than 100%

I noticed that when I enter full-screen mode in Mathematica 9 (F12 for Windows) using a magnification of 125% (or any other number higher than 100%) there is a horizontal scroll bar at the bottom of ...
0
votes
1answer
87 views

Export/Copy + Paste a plot from Mathematica Trial Version to TeX editor

I wish to get a view plots from Mathematica trial version into a TeX editor, but cannot seem to do it (unless I print the screen and crop the image which leads to bad quality). Is there a way in which ...
4
votes
3answers
243 views

Determing two Nonlinear model fits with 95% confidence bands from one data set

I have the following data which is postulated to have contributions from two different sources .....as can be seen from the confidence band, many points are out of the band. Question: How can I ...
0
votes
2answers
119 views

FindMinimum gets confused by If[…]

I'm confused by why the following doesn't work. I'm trying to numerically minimize a function that has an If statement in its definition, as follows: ...
4
votes
1answer
165 views

Forcing Mathematica to recognize a symbol without defining it

In the Mathematica front-end, symbols that have been defined are colored black and symbols with no definition associated are colored blue. This is useful to prevent spelling mistakes. Also, defined ...
1
vote
1answer
251 views

How to generate the following partitions [closed]

I have 2N items and I need to form 2N sets each with N items. The items should be evenly ...
1
vote
2answers
166 views

How can I get an approximate contour plot from a 3D plot?

I have some larger square, Hermitian matrices, M, (dimension 20, say, much more than 4) with 2 independent variables, call them x and y. I can plot the eigenvalues as functions of x and y with: ...
1
vote
2answers
155 views

Processing all files in a folder automatically

I have a lot of files in a folder that needs to be process through a function that I have written in Mathematica. I need help writing a code that would process all the files automatically. ...
2
votes
3answers
106 views

How do I save a Unicode string?

I am having a problem saving a long complicated string with Unicode characters in it. I have boiled the problem down, I think, to this minimal example: ...
4
votes
1answer
140 views

Detect a graphic primitive inside a Graphic

Please excuse me if that question is too basic but I couldn't find anything in the documentation or on here. If you consider the following Graphic I would like to ...
0
votes
0answers
82 views

Ternary and binary searches in Mathematica?

Does Mathematica implement binary search to find a 0, and ternary search to find a local min/max?: http://en.wikipedia.org/wiki/Binary_search http://en.wikipedia.org/wiki/Ternary_search As ...
0
votes
1answer
89 views

To put a plot inside of a plot [duplicate]

I'd like to put a figure of a 2D-plot into a larger 2D-plot (into some white-space), like in the example below: I don't precesely know how It's done, could anyone help me with this one? Is it with ...

15 30 50 per page