# All Questions

123 views

### Assigning Sequence to Part of a SparseArray (bug?)

Part ▪ You can make an assignment like t[[spec]]=value to modify any part or sequence of parts in an expression. ▪ If ...
190 views

### Is there a better way to approximate some graphs of integrals than interpolation?

I'm still pretty new to Mathematica so my apologies if this is a dumb question. I wanted to plot some integrals of functions for no particularly good reason, but the only decent way I could come up ...
134 views

### Returning lists of pixels connected through their Moore neighborhoods

I have a binarized image in Mathematica 9, and I would like to generate a list of coordinates for clusters of pixels connected through their Moore neighborhoods, e.g. ...
292 views

### How manipulate rasterized Graphics3D objects combined with non-rasterized objects

I am trying to construct a building with a manipulated sliding roof and other objects that can be manipulated. I have found that the manipulation of translations and rotations of graphics groups of ...
290 views

### Understanding the computation of the geometric median

In the Wolfram Demonstration Fermat Point for Many Points, it appears that the geometric median is being calculated for an arbitrary set of five manipulable points. How might one extend this ...
87 views

### How would I add together any list of arguments as a pure function?

Let's say I have a list of arguments, of any length. How would I add them all together? f = Evaluate[Plus @@ Array[Slot, 3]] & f[1, 2, 3] This would add ...
244 views

### Performance of compiled functions

I am trying to find the fastest way to calculate two values where both of them are sum of different expressions. I combine both calculations in one Sum[]. I'm ...
175 views

### Averaging an oscillating function

I have a function Ca[t] that oscillates like a Sine curve, that I used NDSolve to obtain. I want to calculate the average value ...
239 views

### Why is a bump function making NDSolve take forever to solve?

I am attempting to solve a system of relatively complicated elliptic PDEs via a relaxation technique. In particular, I am trying to solve $\textrm{div} LW = S$ where $S$ is some vector and $L$ is the ...
78 views

### Why is NHoldFirst not propagated to symbolic derivatives?

I encountered a nasty problem that N cannot evaluate expressions containing a symbolic Derivative of a multi-parameter function ...
151 views

### Interfacing with a LabJack

I have a LabJack U3-HV and I wanted to use it with Mathematica to interface some hardware. I cannot find any information on the Internet; if I have to use Python, I will, but I would rather use ...
70 views

### Basic Row Traversal Question

Right now I'm using this For loop to do an operation to each row of a $n \times n$ matrix, I was trying to figure out how to do this with ...
445 views

...
545 views

### How to read data from IBM 32-bit floating point binary file ? (not the common IEEE !!!)

I am trying to read a binary file. This file records seismic data. Basically its first 3600 bytes are for the general file information, following are for seismic traces, each begins with 240 bytes for ...
65 views

### How can I replace very small scientific form of numbers in output with 0.0? [duplicate]

How cam I get rid of very small scientific form numbers in my output, replacing them with zero? (eg: 2.27682*10^-18 --> 0.0)
84 views

### Why does automatic scaling behave as it does in Plot? [duplicate]

The following command Plot[Exp[-(x^2)], {x, -5, 5}] draws while the following command Plot[Exp[-2 (x^2)], {x, -5, 5}] ...
395 views

### How does ListPlot3D interpolate data?

I have data of the form {{x1, y1, f(x1, y1}, {x2, y2, f(x2, y2)}, ...}. I need to interpolate the data to get an interpolated ...
194 views

### boundary problem

I have some conditions at t=0, like r1^2+r2^2=0.5 and x^2+y^2=6 and I want to find the right ...
1k views

### How can I draw an asymptotic bode plot?

When I use Mathematica to draw a bode plot, it always gives the precise version, like this: BodePlot[(10 (s + 3))/(s (s + 2) (s^2 + s + 2))] How can I draw the ...
111 views

### Cannot access the Database using the JDCB - ODBC

Runnig this code after building the ODBC connection for my access application named WPC : ...
309 views

### Find local maximum in 3D list

I have a set of data of the kind {{$x_i$, $y_i$, $z_i$}, ...} at randomly chosen points $x_i, y_i$. The $z_i$ are supposed to be a smooth function of the $x_i$ and $y_i$. Unfortunately they turn out ...
105 views

### Mean of Date variable data

I have hourly registered data as : ...
1k views

### When I can assume that all decimal digits returned by Mathematica are provably correct?

How to Control the Precision and Accuracy of Numerical Results Arbitrary-Precision Numbers Mathematica works with exact numbers and with two different types of approximate numbers: ...
192 views

### Strange behavior of undocumented RawArray and ArrayObject expressions

I discovered several strange results and inconsistencies while trying to understand what undocumented RawArray and ArrayObject ...
108 views

### Using Dot Product with InterpolatingFunctions

I am using NDSolve on a vector function $\mathbf y'(x)=f[\mathbf y(x)]$ with initial condition $\mathbf y_0$, where the dimension of the vector should be user-defined. ...
642 views

### How to generate a random data set with determined expected value and variance? [closed]

Recently I am doing my math homework and there is a question asking me to Come up with a dataset X that has at least 10 distinct numbers in it such that Expect[X] = 3.7, and Var[X] = 2.1. Actually I ...
596 views

### Normal and Tangent of Acceleration in 3D

I need to figure out how to find the Normal and Tangent of acceleration. I know the formula for the tangent of acceleration is $((Acceleration . Velocity)/(Velocity.Velocity))*Velocity$ and the normal ...
412 views

### How can I put an image on a surface [duplicate]

I want to paste an image on the surface of a 3D plot. For example consider this image which I want to paste on the surface of this sphere ...
289 views

### Excel column label from integer

I would like to create a function in Mathematica, which returns the equivalent Excel column label (e.g., A, Z, AA, AZ, and so on) given a column number. I think it can be done with ...
178 views

### Solving this system of equations produces an error message about badly conditioned matrix

I want to determine a balance distribution. Ü = {{0.4, 0.2, 0.3}, {0.3, 0.5, 0.2}, {0.3, 0.3, 0.5}}; and ...
491 views

### How to choose three points on the circle so that the triangle is not a right triangle?

I want to choose three points $A$, $B$, $C$ has integer coordinates on the circle $$(x+2)^2 + (y+1)^2 = 25$$ so that the triangle is not a right triangle. But I can not. I tried ...
114 views

### Finite precision - how to get rid of “near zeros” [duplicate]

I am performing a finite-precision operation on a matrix A which I know precisely; call the result B. The operation is taking ...
205 views

### My mistake or error in NDSolve?

I try to solve the following equation $$y'=y-2ye^{-0.8y}, \quad y(0)=0.7.$$ By some aruments I expect to have a positive solution $y(t)\geq0$, for all $t>0$, however, NDSolve shows that starting ...
298 views

### Measuring the area of non analytical regions in a plot [duplicate]

As the title says, I want to measure the area of different closed regions in a plot. Let me be more specific by giving a characteristic example. In the following figure, we observe that inside the ...
226 views

### Malliavin Derivative with Mathematica is it possible?

Is it possible to define a Malliavin calculus with Mathematica 9? Consider a random variables on the Wiener-space $\Omega=\mathcal{C}([0,1])$ of the form ...
170 views

### Integral of a transcendental equation

I have taken the following derivative of a transcendental equation using the D[...] function, as part of an approximation: ...
187 views

### Making an animated simulation without procedural loops

I'm still new to Mathematica and this is the first time I've wanted to do something more complicated than plotting and changing parameters of mathematical functions. I want to make a simple ...
273 views

### Numerical Integration with InverseErfc

I am trying to numerically integrate an equation that involves InverseErfc (embedded in the copula defined). The equation looks like the following:  \int_0^T \int_0^\infty \int_0^\infty ...
378 views

### I can't understand FindShortest Tour

I can't understand the function FindShortestTour because of the result: FindShortestTour[{ {0, 1}, {5, 1}, {2, 1}, {10, 1}}] ...
2k views

### How to find the Shortest Path, visiting ALL vertices, without coming back to the start (Hamiltonian Path, minimum distance)

A car has to pick up each person and take them to their destination. I am trying to find the shortest tour that will do this. How can I find the shortest path between any s and t.... visiting all ...
105 views

### More general pattern fails to match everything the more specific pattern does.

When I input this: MatchQ[x*SF[a,b] + y*SF[c,d], Plus[Times[x,SF[a,b]],Times[y,SF[c,d]]]] I get "True" as expected. But If I change it to: ...
82 views

### Manipulation of Automatic settings in a given case

Often I use the Automatic option to specify plot styles, plot ranges, image sizes, etc. I'd like to be able to apply some modifications to these automatically ...
231 views

### Drawing tool with Overlay

I combined two plots using Overlay. In the output plot I want to add few modifications. Usually I right click on the plot (for ...
387 views

### Trace of FullSimplify

I have a symbolic function and I used FullSimplify command to simplify the equation given below. I am calculating it by hand but I couldn't reach the same solution. ...
120 views

### Difference between Directory[] and NotebookDirectory[] .. a trailing /?

The following was the code: Directory[] NotebookDirectory[] The output was ...
496 views

I have list of pairs of points: $\{(x_i,y_i)\}_{1\le i\le n}$, $x_i \in \mathbb{R}^3$, $y_i \in\mathbb{R}^2$ and would like to optimize over a rotation $R \in SO(3)$, a translation $t \in ... 1answer 184 views ### Calling several compiled functions inside another Below, there is an example how I tried to call the compiled function "position" (which i got from this link position) inside another one. ... 1answer 807 views ### Simplify$\cos(n \pi)$and$\sin(n \pi)\$ when n is an integer

I was trying to calculate this integral in Mathematica 9: 2/π Integrate[ Cosh[a x] Cos[n x], {x, 0, π}, Assumptions -> n ∈ Integers] I got as a result : ...