0
votes
0answers
55 views

NMinimize and FindRoot Issues with System of Equations [duplicate]

I am trying to solve a constrained optimization problem with a system of transcendental equations and am running into issues with NMinimize. I have a system of equations (...
4
votes
1answer
114 views

How can I test properties of a symbol without unwanted evaluation

Problem How to get the head, size, dimensions, etc. of a symbol without evaluating it? Since Mathematica does not allocate fix storage space and type to symbols it is not trivial to query runtime ...
5
votes
3answers
550 views

How do I find the intersection of a closed 3D curve given by numerical data with a specified plane?

I have a list of 3D data points which form a closed curve. My own data can't be easily generated analytically, but the qualitative behaviour is well represented by a parametric curve families such as ...
6
votes
2answers
483 views

Animated Vector plot

I'm trying to make an animation of a time-varying 2D vector field. However, I'm got a difficulty in that Mathematica normalises the length of the vectors with each call to ...
0
votes
2answers
203 views

Seeking faster method than using Table and If together [duplicate]

See the example below. Is there any way to make this execute much faster and still get the same output ? I have read Conditionals slower than operators? but it didn't really help me as I can't seem to ...
1
vote
0answers
132 views

Conditional solution for system of linear equations

I have a linear equation system Q.m = t, with m unkown and where Q has dimensions ...
1
vote
2answers
294 views

How to place Plot Information within a Text box on top of a Bar Chart?

How could I place a text box on the top of a bar chart where the top line would have a larger font size than the second line? My Data: ...
3
votes
1answer
207 views

How to determine cluster membership using FindClusters?

I have a 1000 by 3 data matrix in which for each person we have 3 scores. I want to cluster those persons into 8 cluster using Agglomerative method. I did the clusetring by: ...
4
votes
1answer
251 views

How to add equations' left and right sides together?

If we have two equations E1 and E2, and instead of using Solve to solve it, we simply need to manually add them up which would allow some simplification that could ...
2
votes
0answers
181 views

Problems with Simultaneous Equation Solving

Let me first explain what I am doing and then I will explain the problem that I can't figure out. I am basically trying to solve 2 equations for 2 unknowns (a1 and ...
1
vote
0answers
144 views

Why doesn't ParallelMap improve the performance of FoldList?

This question arose during my analysis of the following problem: filling gaps. (The code used here is Simon Woods's work.) FoldList seems to not cooperate with ...
7
votes
1answer
174 views

FullDefinition and Module local variable

I have a question about FullDefinition and how it interacts with the local variables of Module. I've created a few functions ...
0
votes
1answer
323 views

Hue-like Legend spectrum with bright colors for a plot

I use Hue to color ArrayPlot: ...
5
votes
0answers
154 views

Exporting large numbers in WDX format

I have a list of 10 000 3×3 matrices in Mathematica. The entries are rational numbers. I would like to write this to a file so I can load it again in the future. After some fussing with file formats, ...
0
votes
0answers
30 views

Keeping memory to reduce the running time of recursion [duplicate]

I am using the following recursion in Mathematica to compute W[n, 1, s] for given n and s: ...
2
votes
4answers
208 views

How to improve the quality of the ListPlot output

I need to plot massive data stored in external ASCII files. Below is the Mathematica code I use for this job: ...
5
votes
1answer
269 views

What does ` symbol in ClearAll[“Global`*”] mean?

I have found an example for clearing all symbol definition by: ClearAll["Global`*"] But what does the symbol ` mean? It isn't the apostrophe ', yet it is not ...
5
votes
3answers
327 views

Getting RGBA data from an image

What is going on with returned data in the following examples? It appears ImageData returns different types depending on the what data is passed into ...
3
votes
1answer
97 views

Generating Palindromic_number [duplicate]

I'm trying to construct Palindromic_number, I came up with this code: ...
2
votes
0answers
148 views

Real integral evaluating as indeterminate

Mathematica evaluates the following integral as: ...
12
votes
10answers
612 views

How can I generate a nested array like this one?

Well, this is how the array looks like: I came up with this code: n = 10; Nest[ArrayPad[#, 1, 1 - #[[1, 1]]] &, {{1}}, n] /. {1 -> "*"} Any better ...
1
vote
2answers
259 views

Finding normals to a curve through a given point

I want to find x on curve $y(x)$, where curve $y(x)$ is perpendicular to point $(x_0,y_0)$. for this I minimize the distance between points $(x,y(x))$ and $(x_0,y_0)$, here's an example for point ...
3
votes
2answers
157 views

Modify all the second elements of every pair in a list of pairs

I have a list in the form {{a, 1}, {b, 2}, {c, 3}}. Let's say I want to operate a transformation on all the second elements of each sublist, but this transformation is a function of them all ...
16
votes
4answers
1k views

Plotting a contour on a torus

There are two ways to consider a two-dimensional torus. One way is to take a parallelogram (let's say the square $[0, 1]^2$) and topologically glue the opposite edges. Another way is to look at the ...
14
votes
1answer
244 views

Dynamic and LibraryLink: dynamic visualization of a simulation

I am asking this question to save some time and I am expecting answers only from people who have tried something like this before. (I realize that I could just try it and see if it works, but that ...
7
votes
3answers
565 views

How to connect Mathematica 9 to MS SQL 2012 using Windows 7 enterprise (64-bit)

I have used Microsoft Open Database Connectivity (ODBC) with Mathematica 8.0 and MSSQL 2008 on Windows XP, but I can't get it to work on Windows 7 Enterprise (64-bit) with Mathematica 9.0.1.0 and MS ...
11
votes
1answer
102 views

When is the output of examples in function documentation rasterized?

Upon building documentation in Workbench, Workbench sometimes converts the output of examples on function pages into rasterized images, and sometimes not. Does anybody know what controls this ...
9
votes
3answers
384 views

FindShortestTour for charity (or: How can I optimize meal delivery with FindShortestTour?)

I've been wondering about this for a while - but never got around to asking - until I saw faleichik's incredible answer to Mathematica Minecraft. I did some work at a not-for-profit a little while ...
3
votes
1answer
359 views

Why isn't autosave enabled by default?

While I've come across several ways to implement/enable autosave (see: Is there a notebook autosave frequency configuration?, Saving my code before cell evaluations: Insurance against front end ...
2
votes
1answer
695 views

Excel DDE Link: reading and writing in real time

I'm wondering if it is possible to link Excel and Mathematica in real time, so that Mathematica can be used as a computing and "storage" tool. Suppose I have an Excel spreadsheet with an active DDE ...
5
votes
2answers
464 views

Transcendental equation with ContourPlot3D

I am still a newbie to Mathematica, so I am still getting used to the syntax and logic of the program - but I've been trying to do the following 3D plot: ...
2
votes
0answers
99 views

Disagreement between FindGeoLocation and Alpha: “Where Am I?”

While trying to estimate a user's location in a notebook, I noticed that FindGeoLocation[] was extremely inaccurate. I realize that it uses an IP lookup to make ...
5
votes
1answer
537 views

Wallis Formula and Pippenger Product---How do we get symbolic output?

The Wallis Formula computes $\frac{\pi}{2}$ OEIS and the Pippenger Product computes $\frac{e}{2}$ OEIS. Here is a combined formula: ...
1
vote
1answer
98 views

Memory handling by ConstantArray

I noticed the following issue when using ConstantArray: a = ConstantArray[0., {10000, 100}]; ByteCount[a] (* 8000152 *) Then ...
20
votes
1answer
635 views

xkcd: Geohashing in Mathematica

On May 21, 2008, an xkcd comic proposed a method for creating a random, local meeting place that can't be determined until the day of the meeting. This method is usually used for xkcd fan events, ...
16
votes
6answers
572 views

How do I replace a missing value in a column with the value immediately above throughout a table?

I have a large table (7000 rows × 17 columns) of terse textual data. In many of the columns, empty entries have been replaced with "." as a marker. Working from the top of the columns downward, I want ...
6
votes
1answer
395 views

Building a molecule viewer: aesthetic rotations

I am working on building a molecule viewer in Mathematica and am running in to problems with controlling rotation of the molecule (which is rendered as a ...
0
votes
1answer
103 views

Counting Stochastic Processes and displaying relative value

Counting Stochastic Processes and displaying relative value I have two watermarks and multiple stochastic processes given. I want both to display and count the stochastic processes which are below ...
0
votes
1answer
226 views

Can I take derivative of a function that represents a piece of music?

Can I take the derivative of a function that represents a piece of music? The music is given in .mp3, .midi or whatever comes in handy.
0
votes
1answer
332 views

Manipulating and plotting two interdependent functions: [closed]

I want to plot two functions. Function G8 and G9. Both should be manipulable. Function G9 should dependent on Function G8. Function G8 has a bigger starting value. If function G8 increases by δ ...
1
vote
1answer
104 views

Is it possible to create a styled cell with pre-defined content?

When you create a new styled notebook from the Stylesheets chooser dialag, you get a new notebook using the chosen style with some sample content provided. But if you apply styles from the same ...
9
votes
1answer
247 views

WhenEvent and partial derivatives

Can WhenEvent be used to reset the conditions on a PDE at a given time? How would the syntax of that be? This is the code I`m using ...
4
votes
2answers
262 views

Simplifying the trace of a matrix expression

I have a long expression involving matrices that I derived using the NCAlgebra package. Can I simplify the trace of the expression? For example, say b is a scalar ...
14
votes
7answers
631 views

A function that accepts a pair or a list of pairs

Probably a duplicate, but it's not easy to search on "lists". I have a function that accepts a list of lists, say {{a1, b1}, {a2, b2}, {a3, b3}} and performs some ...
2
votes
0answers
194 views

Plotting equipotentials gone wrong [duplicate]

I'm plotting the equipotential of the potential function: $$\phi(x,y,z):=\frac{1+x^{2}+y^{2}+z^{2}}{[\left(1+x^{2}+y^{2}+z^{2}\right)^{2}-4z^{2}]^{1/2}}$$ Mathematica code: ...
0
votes
0answers
378 views

Coefficient of determination (R squared) of EstimatedDistribution

I have estimated the distribution for a set of data as LogisticDistribution[3.5, 1.037]. How can I calculate and plot the coefficient of determination (R squared) ...
8
votes
5answers
274 views

Wrapping a function in count

I am working through the Programming Paradigms via Mathematica (A First Course) and am attempting to answer the following: Use recursion to count how many times the argument can have its square ...
10
votes
1answer
203 views

Is there a method to enumerate the keys/values of System`Utilities`HashTable

Lacking from the simple API of System`Utilities`HashTable is a method to enumerate the keys/values. ...
0
votes
1answer
236 views

Plotting the simulation of Brownian Motions with multiple thresholds

I have the following problem: I have a watermark in this model where not only the mean of all stochastic processes is calculated, but also the mean of those processes which remain beyond a given ...
1
vote
1answer
216 views

NIntegrate converging too slowly when increasing size of array

I have a problem with a numerical integration. I have a 4x4x4x4 array that has for each entry an integral and I want to use NIntegrate to evaluate it. It gives me ...

15 30 50 per page