4
votes
2answers
1k views

How to define a polynomial/function from an array of coefficients?

I have the coefficients of my desired polynomial in an array CoefArr (I'm new to mathematica, so I think of everything as arrays, it is actually a list I believe) starting with the constant at index ...
2
votes
2answers
106 views

Putting a matrix inside function

I want to fit a function to some data and inside the function there's a list here's my data ...
5
votes
2answers
927 views

Equivalent of MATLAB's “hold on” function

I'm making an animation where the number of iterations is known. I tried using Dynamic, as I prefer updating in real time over generating data before plotting. I ...
9
votes
2answers
294 views

Drawing Cylindrical Segment with Graphics3D

For a visualization I need a combination of 3 Cylindrical segments to visualize the incident, reflected and refracted beam of light at a surface. I got as far as the following code. ...
4
votes
1answer
141 views

Why is this code in functional style is slower than procedural style?

I know that in Mathematica a functional programming style is often more efficient than procedural style programming using For loops. But the code shown below seems ...
5
votes
4answers
476 views

How can I return the color at a coordinate in an image?

I have an imported and cropped image: TestPicture = Import["filepath.jpg"]; TestPictureCropped = ImageCrop[TestPicture, Min[ImageDimensions[TestPicture]]]; How ...
1
vote
2answers
91 views

Why will my plot not generate my entire plot?

I am trying to plot a sum of multiple HeavisidePi functions. A typical example would be something like this: ...
3
votes
1answer
115 views

How do I access the binary matrix underlying an EdgeDetect output?

Applying EdgeDetect to an image generates a black and white edge-detected image, which I suspect corresponds to an underlying binary matrix. How can I access this ...
-1
votes
2answers
455 views

How can I define a function which is the sum of other functions?

I have a function which is summation of another function over different i,j iterators. U[r] = Sum[V[r, i, j], {i, 1, 5}, {j, 6, 10}] and ...
0
votes
2answers
563 views

Finding max, min, and closest root of two dimensional data

I have some data that is two dimensional (traditional (x, y) format) as so: var = {{x1, y1}, {x2, y2}, {x3, y3}} I would like to search through that large list ...
10
votes
6answers
829 views

Multiplying two dimensional data by a constant

I have a list of lists of the form: {{1, 2}, {2, 4}, {2, 8}} But I want to multiply only the second dimension of that data by a constant. I know I could do this ...
37
votes
1answer
955 views

How to compare power towers in Mathematica?

First I tried it directly, but it overflowed: ...
1
vote
0answers
56 views

Decimal representations of analytic values in an expansion

I have a solution to an ODE (which I call sol), which I would like to expand in terms of Log[1+x] around x=-1. I thought that: ...
4
votes
1answer
121 views

Can I customize In[] and Out[] headers?

Can I customize the In[] and Out[] headers? I'd like to add $UserName, ...
2
votes
1answer
88 views

How to make a notebook not savable?

How to make a particular notebook not savable? Optionally, how to do this by evaluating a command in the notebook?
1
vote
1answer
456 views

Dynamically labeling a family of curves [duplicate]

I have created some simple code which generates a plot. This plot contains a family of curves created by changing a single parameter "k". I use the Table function within the Show function to iterate ...
1
vote
2answers
2k views

Font size in PlotLegends, using Table to generate the list in the legend

I am currently trying to get to graph with several functions as below. My problem is that I cannot change the font size in the legend (authomatically generated numbers by "Table" function). This code ...
9
votes
1answer
492 views

Why can't I change the value of MaxRecursion in NIntegrate when integrating BesselJ?

I am trying to evaluate this integral numerically $$ \int_0^{\infty } J_0(q R) \tanh(q) \, \mathrm{d}q $$ for large values of $R$. This makes the integrand oscillate more quickly and Mathematica ...
0
votes
2answers
658 views

Correct use of ListInterpolation

I have a small problem with ListInterpolation. I want to use ListInterpolation to postprocess result of a numerical simulation. ...
9
votes
1answer
154 views

Unset variable by its name given as a string

Unlike the function Clear, the function Unset does not work for string patterns. Given the name of a variable as a string, how can you unset the corresponding variable? Example: Given: ...
2
votes
3answers
258 views

Symbolic manipulation of functional form

I have a functional polynomial expression of the form: ...
3
votes
1answer
272 views

String replacement to make the TeXForm output beautiful

This question is inspired by this question: How to convert the symbol $d$ in Integrate into $\mathrm{d}$?. Although it’s not a big problem, the TeXForm can be ...
2
votes
2answers
362 views

Count and plot the number of solutions in an interval

I have equations depending on one or more parameters and I want to find and plot regions in the parameter space in which there is a specific number of solutions. For definiteness let's consider a ...
6
votes
0answers
202 views

Using perpendicular offsets in FindFit

I want to use perpendicular offsets in the built-in FindFit function. Are there any possible ways or do I have to code everything by myself?
1
vote
1answer
231 views

Why is arithmetic faster for inexact arithmetic?

I have been trying to compute eigenvalues of a rather sizable matrix A, about $500 \times 500$ (but sparse). I asked Mathematica to compute ...
2
votes
0answers
372 views

How to make the imaginary part of a +0. I zero globally?

Values like a +0. I are really annoying. Answers from How to reduce expressions with complex coefficients in the form of a+0.*I? Is there a way to globally set when to treat a very small number as ...
1
vote
1answer
418 views

why there is a small imaginary part [closed]

I encountered a problem. I have a eigenvector eigvsI[1] ...
4
votes
1answer
93 views

Why can't I change the style of a cell repeatedly?

I ran into this when I was working with an example from the Help Pages of V9. Cells is a new function added in V9. The following appears to work the first time it ...
1
vote
1answer
404 views

How to increase precision: $MinPrecision does not help [duplicate]

I have the following series: ...
2
votes
0answers
48 views

Multiple screens support for slideshows

I really like using Mathematica for building slideshows/presentations. But is mirroring the only way to see the content both on the laptop's screen and on the projector? When using screen mirroring, ...
0
votes
1answer
149 views

Labelling Curves Using ListLogLinearPlot within DynamicModule (So Close)

I currently have a large number of time-series datasets in the form where the name and time-series transposed data, so I have a list of lists of names for datasets and their time-dependant data. The ...
3
votes
4answers
549 views

Importing or reading data in binary format 212

I have a binary data file in format 212, and I want to import the file into Mathematica. How do I read or import binary format 212? I almost have no direct experience of working with any binary ...
1
vote
1answer
318 views

Finding n-th term of a sequence of functions

Lets say, I have the following series of functions, $f_1=a+1$ $f_2=a^2+2a+1$ $f_3=a^3+3a^2+3a+1$ Assume that $f_4, f_5,$ and $f_6$ are also known. However $f_n$ is not known as a function of $n$. ...
5
votes
1answer
502 views

Does LinearModelFit perform an ordinary linear regression (least squares)?

Does LinearModelFit give an ordinary linear regression? I see lots of options, but nothing like "least squares" or OLR.
9
votes
1answer
290 views

How to calculate this integral? Integrate[BesselJ[0, x - BesselJZero[0, 1]]/x, {x, -Infinity, Infinity}]

I tried to calculate the following integral, but it returned unevaluated. ...
3
votes
0answers
161 views

Put webMathematica folder outside Tomcat webapps folder?

Is it possible to put the webMathematica folder outside the usual Tomcat webapps folder and still have webMathematica work? ...
1
vote
0answers
51 views

Scaled ColorData Function [duplicate]

I have a four-dimensional array c, in which the first dimension represents time and the other three dimensions represent (x,y,z) ...
1
vote
3answers
163 views

Sync Animated Plots

Here is my Lorenz code: ...
6
votes
1answer
199 views

Remap Ctrl+Space?

The Ctrl+Space keyboard shortcut is really important in Mathematica for using Placeholder[] boxes in input templates. Unfortunately, Ctrl+Space occupies the ...
5
votes
0answers
213 views

Parallelizing is much slower than single kernel evaluation?

Starting with a vector of matrices, tVec, I would like to parallelize the multiplication of each element with the same matrix ...
1
vote
1answer
108 views

How can I assign specific colors and sizes to 2D coordinate arrays being plotted with ListLogPlot?

I'd like to plot two sets of coordinates in two different arrays using ListLogPlot, and be able to individually specify the sizes and colors of the datapoints for each array. Things seem to work ...
0
votes
2answers
154 views

Import matrices side-by-side separated by TAB

The problem is 0(TAB)0 interpreted falsely as a dark red square although it should be a dark red square surrounded by zeroes/ones. Import has different data-formats ...
3
votes
2answers
447 views

Working with a database

I just started to work with a database through Mathematica. I have a large data set. I use an .mx file to store my data. Now I have to store the data in a database, ...
8
votes
1answer
1k views

How can I change the size of the plot markers

I use ListPlot in order to plot four sets of data and also insert legends in my plot. Here is the Mathematica code ...
3
votes
1answer
229 views

Command to get License Management Monitor info

Using Netlink, when we have more users than Mathematica licenses (used in a pool), we get messages such as: Error code: 11. Connected MathLink program has closed the link, but there might still be ...
0
votes
1answer
300 views

How to manipulate a Fourier sine series?

I would like to plot the Fourier sine series for $f(x) = x$. I would like to manipulate the parameter n from $0$ to $10$ and plot the sine waves over $(0,1)$. My ...
5
votes
3answers
546 views

Implementing the Farey sequence efficiently

There is of course the silly implementation: FareySequence[n_] := Union[Flatten[Table[j/i, {i, 1, n}, {j, 0, i}]]] However, there are numerous properties and ...
4
votes
2answers
129 views

Refresh dynamic variable when used with Get

I came across this issue with a more complicated program I was working on. Suppose we have a volatile variable data: ...
2
votes
1answer
183 views

How to convert the symbol $d$ in Integrate into $\mathrm{d}$?

I used TeXForm[HoldForm[Integrate[x^2, {x, 1, 2}]]] to convert the integral $$\int_1^2 x^2 \, dx$$ How to get $$\int_1^2 x^2 \, \mathrm{d}x ?$$

15 30 50 per page