0
votes
0answers
46 views
Abridging Lists of Equations within NDSolve, Manipulate [duplicate]
I have a pretty little NDSolve function that I've finally decked out with manipulatable (by sliders) coefficients, which changes the graph in real time. However, I ...
0
votes
0answers
22 views
How to quick locate error lines in the Mathematica .m File [duplicate]
Syntax::sntue: Unexpected end of file (probably unfinished expression)
(line 131 of "MyWord`").
possible to show line number?
-1
votes
0answers
49 views
Doing vector manipulations in Mathematica (Part 2) [closed]
Inspired by the answer from Simon Woods, here, Doing vector manipulations on Mathematica, I thought of doing the intended vector manipulation in the following way but it didn't work!
...
5
votes
0answers
109 views
3D visualization of 4D object data
I have some paired data here {{x1,y1},...{x_n,y_n}} (Download link) which represents {frequency, amplitude} of a spatial object surface mesh. Its quite a lot of cells and data as you can see in the ...
1
vote
0answers
24 views
Combine InputAlias with InputString to parse expressions from a string
My knowledge of low-level notebook programming is very limited so I would be very grateful for any input regarding the following issue:
I would like to define an input alias (via ...
1
vote
2answers
81 views
Converting polygon to graph in V7
I've unsuccessfully tried many ways of converting polygon points into a graph using Mathematica 7, and I am frustrated. I looked at this post, but it doesn't work:
...
8
votes
1answer
137 views
CorrelationTest small bug?
Consider two Normally distributed random variables:
x1 = RandomVariate[NormalDistribution[], {1000}];
x2 = RandomVariate[NormalDistribution[], {1000}];
I want to ...
10
votes
2answers
173 views
What kind of hypergeometric function is it?
I found a formula for an integral of a product of three Bessel functions at The Wolfram Functions Site:
I cannot understand what kind of hypergeometric function it is.
The Mathematica code given ...
1
vote
0answers
51 views
Exporting Specific Cells of Many Workbooks into One using Mathematica
I currently have a large number of detailed files from which I would like to extract certain cells' information to make an Archive spreadsheet.
There are approximately 9 parameters of each ...
18
votes
0answers
121 views
Why is StringExpression faster than RegularExpression?
Edit: as noted by Albert Retey the performance difference is only seen when sub expression extraction is performed. If this test is used below the timings are similar:
...
1
vote
1answer
86 views
+50
Underflow occurred in compilation
This code shown below works well for n<=10, if n>11, Mathematica gives the message
CompiledFunction::cfne: Numerical error encountered; proceeding with
uncompiled evaluation. >>.
So ...
21
votes
0answers
107 views
How safe is the use of Block and Internal`InheritedBlock
For many questions on this site answers are given which suggest to use Block and, especially for more advanced topics, ...
1
vote
0answers
71 views
How can I say that all quantities need to be positive (and real)?
Can you say at the beginning of a script in mathematica that you want all the quantities to be positive (and real)? So that in all calculations, only the real values of these quantities will be ...
2
votes
1answer
52 views
Simple problem about shadow symbols in multi-contexts
When I'm tiding up my simple packages, shadow awlays comes out. Here is an example.
Packages1
...
1
vote
1answer
128 views
Emulate Powerpoint behavior: Show additional cell content with each click
Is it possible to emulate powerpoint animation behavior during a presentation with Mathematica?
Considering a notebook with cell of numbered items or even several cells, is it possible to display a ...
3
votes
1answer
124 views
0
votes
1answer
30 views
Have the kernel load a user-defined function by default [duplicate]
I wrote a very simple function that I would like to act as if it were one of the default functions that came with Mathematica, so that you don't have to load or import any package before you make use ...
0
votes
2answers
72 views
Plot 3D set (or a domain of three-variable function)
is there any way to plot a "3D set" of points subject to certain rules? For example, my task is to find maximum of some function of three variables which have to meet some conditions. Of course I ...
-2
votes
1answer
114 views
Forecast Future Stock Prices - Brownian Motion [closed]
Hi I have some questions:
Could anyone of you suggest me some literature or tutorial or similar stuff concerning financial modelling in Mathematica?
I found the Wolfram Finance Platform where I ...
-2
votes
0answers
30 views
Create/Plot Tables of sequences and partial sums
How exactly do you create and plot tables of sequences and partial sums?
4
votes
2answers
121 views
How to replace a variable that was assigned a value before
Question
How to make the replacement $f[x] \to f[y]$ for an abitrary function $f$ if $x$ was assigned a value before?
Example 1
How can I make the replacement $x +1 \to y + 1$ if I have assigned ...
2
votes
0answers
35 views
5
votes
1answer
42 views
Combine absolute and relative (scaled) coordinates
I am using Inset to add an Epilog to a plot. The position of the images (in my case: framed numbers) can be specified as an ...
0
votes
1answer
47 views
Using NonlinearModelFit to fit data with errors
Assume we have some data of measurements
SeedRandom[9];
data = Table[{i,2*(1 + 5*RandomReal[])*Exp[-0.01*(1 + RandomReal[])*i]}, {i, {0, 100, 200, 400, 700}}];
...
5
votes
1answer
36 views
How to relate memory usage with occupied positions of SparseArrays?
What is the relation of memory usage of a SparseArray
and the number of its occupied positions?
Let's say you build a 100.000.000 by 10 element SparseArray.
And fill the two position 1/1 and ...
3
votes
4answers
92 views
5
votes
0answers
48 views
Faster way to perform SameQ[Reduce[…], Reduce[…]]
I'm have some expressions that I need to confirm the equality of. SameQ[Reduce[...], Reduce[...]] works like a charm for the more simple expressions, however when ...
0
votes
0answers
38 views
Interpolation and points of non-differentiability
I have some data, which if expressed by some elementary functions, would contain a non-differentiable point. I would like to be able to use something like interpolate to convert the data into a ...
2
votes
2answers
90 views
Optimizing functions taking matrix arguments
I'm looking for general information on how to optimize matrix valued functions, I have the following function I'm looking to maximize (or figure out if this is possible at all).
...
7
votes
2answers
134 views
How to draw a contour diagram in Mathematica?
This answer at Math.SE contains a neat contour diagram created using Mathematica:
What Mathematica functions I can use to draw diagrams like this?
6
votes
1answer
91 views
Telling mathematica to output * instead of space for multiplication, so I can copy as plain text
I am trying to get some symbolic expressions in Mathematica
which I would like to paste into my C/MATLAB codes. This can be accomplished
nicely by selecting the expression and right-clicking to ...
4
votes
5answers
138 views
A simple StringCases problem
Given this text:
text1 = " A Vitamin D Deficiency (ICD-9-CM 268.9) (ICD-9-CM 268.9) 09/11/2015 01 ";
Yes, the ICD code values are duplicates- possibly but ...
7
votes
1answer
80 views
Performance of Dispatch and lists of Rules
First of all, I have seen the question "Why is this parallel evaluation with Dispatch[] so slow?", but that seems to be a different matter.
My question arose when I tried to answer this question by ...
3
votes
1answer
56 views
Question about usage of Style as Dynamic object
I saw a Dynamic snippet in this answer, which wrote
...
0
votes
0answers
47 views
Question regarding function definition overloading / argument passing test [duplicate]
It is possible to define function dependently to passed argument type or condition this argument fulfills (somewhat like overloading):
...
1
vote
1answer
63 views
Weird vertical line when trying to plot a histogram [duplicate]
I'm trying to plot a histogram of a few data points and overlay a plot on it (it's a fit of a geometric distribution to my data). The weird thing is that a vertical line appears always next to the ...
2
votes
1answer
99 views
How to draw tiles with different height?
I have a random matrix RandomReal[{1, 2}, {20, 20}], whose elements represent the heights of an array of tiles. The cross sections of each tile are square and ...
2
votes
1answer
65 views
Manipulating plot of random iterated function system fractal
I'm generating the Sierpinski Gasket by implementing a chaos game in mathematica. What I'd like to do is create an interactive manipulation with a slider, whereby moving it forward, plots all the ...
1
vote
0answers
55 views
FindRoot runs out of memory in Windows but not on Mac
I am using FindRoot to find solutions to a large, highly oscillatory equation which I generated using other code. When I run ...
3
votes
1answer
111 views
Filtering the elements of an array to split them into two categories
So, I am new to Mathematica, and I am trying to write something that involves taking values from one array and separating them into two different arrays. My code for doing this is:
...
0
votes
0answers
89 views
Precision of a complex number
In an output I'm getting a number like -0.33998187034939803 + 0.I. Finding ...
6
votes
1answer
62 views
create function that behaves like continuedFraction [duplicate]
I'm just starting to learn Mathematica and I got stuck at this question. This a noob question but please help.
I need to define a function named continuedFraction that takes user input of type list ...
21
votes
4answers
371 views
Why is there no PositionFunction in Mathematica?
Too often I have seen the programs of inexperienced users greatly slowed by using Position in an iterative fashion, when far faster would have been to compute a ...
18
votes
4answers
342 views
How can I detect an ellipse in a photo?
I tried to detect the rim of the following cup as an ellipse.
I've tried the solutions given in How to find circular objects in an image? to detect the ellipse, but the detection result was not ...
3
votes
1answer
54 views
How can I use Manipulate[] to click on a Graphics3D output and generate $(x,y)$ outputs on a projection plane parallel to my screen?
Say I have some Graphics3D object that I'm looking at from a top down perspective, e.g.:
...
0
votes
0answers
21 views
How do I automatically “trim” the bounding box for a Graphics3D output? [duplicate]
I noticed that, provided some Graphics3D output scaled with ImageSize, I can get rid of a lot of the empty space around the graphic by right-clicking and then selecting "Trim Bounding Box". Thinking ...
3
votes
1answer
59 views
undisputed FrontEndTokenExecute
Thanks to that great topic, I've found FrontEndToken i was looking for:
"DeleteGeneratedCells". Well it is also written in ...
-2
votes
1answer
99 views
How to insert big list of Data in DB?
I have a list of values with length is 60000.Earlier I used this list in my App by using ...
2
votes
1answer
60 views
How to keep ItemSize effect when export to HTML
Here's the simple code
Grid[Table[Item[1,ItemSize->{5,10}],{2},{2}],ItemSize->{5,10},Background->Red]
Save the output cell as .html file, ...
2
votes
0answers
55 views
Speeding up a numerical constrained quadratic optimization
I'm trying to solve a quadratic optimization problem in 35 variables, $\vec{α} = \left< α_1, \ldots, α_{35}\right>$:
$$
\begin{aligned}
&\operatorname*{maximize}_\vec{α}&&1.0\cdot ...





