# All Questions

392 views

### How to find a length of a curve constructed using Spline?

By fitting the data using spline, I have created a curve. sp = SplineFit[data1, Cubic] I am trying to divide this curve into small segments of equal length. To ...
930 views

### How to draw confidence ellipse from a covariance matrix?

I am studying a two-dimensional dataset, whose mean vector and covariance matrix are the following: ...
128 views

### Ordered associations

Mathematica 10 has introduced Associations, elsewhere known as hash tables or dictionaries. Is there Ordered equivalent like in Python, Java, .NET? The data structure should remember the order in ...
177 views

### Deseasonalize the data of traffic growth for the past data

In another question (Using TimeSeriesForecast for forecasting the traffic growth) I asked to use the TimeSeriesForecast on this set of data the answer provided the plot with and without the ...
120 views

### Dimensionless quantities

I must admit that I don't think this problem is really new. However, I haven't found a post dealing exactly with this aspect of the issue. I am doing calculation using Quantities, but I have problems ...
110 views

### Extracting subscripts and superscripts

Suppose I have several types of expressions (in some random order) of the form Power[Subscript[g, a], μ] which is $g_a{}^\mu$ ...
217 views

### Beginner CUDA: two dimensional blocks and two dimensional threads?

This is a follow up question to: CUDA: setting grid dimensions. The purpose of the question is to understand how Mathematica is interfacing with CUDA's architecture. I have a related question/request ...
219 views

### Altering values in Manipulate with dynamically generated controls

I have a Manipulate whose controls are generated based on a parameter in a containing Manipulate: ...
324 views

### Approximate value for the area between the curve

I've got this task: Use Mathematica to obtain an approximate value for the area between the curve $y=1/4$ and the x-axis over the interval $[1,2]$ with $50$ subintervals using the left ...
553 views

### Extrude 2D cross-section to 3D shape with shrinkfactor

I would like to create a 3D shape from extrusion and scaling of a 2D contour. The 2D contour that I have looks like this: and it consists of a bunch of points (here plotted with ...
107 views

### Make Mathematica show function template's arguments in different lines (i.e. in column) by default?

I feel a bit uncomfortable with Mathematica 10's layout. I mean, I'm impressed how powerful functional programming can be and so on, but it's me or those programs are often just a bunch of nested ...
539 views

### Why is there a huge performance gap using Map with more than 100 List entries

im using Map on a List like this: cube= {{1, 1, 1}, {1, 1, 2}, {1, 1, 3}, {1, 1, 4}, ... , {5, 5, 4}, {5, 5, 5}} Mapping the whole List with 125 entries takes ...
213 views

### Alternatives ordering affects pattern matching in Cases?

Given expr = f[x, g[y], z] In the following query, the pattern h_[__, c_] appears as last slot in ...
270 views

### Mathematica script - Using front end

I'm running Mathematica on OS X and I want to create an Automator action that converts spreadsheet files. I have written this script: ...
704 views

I want to do some large data analysis, and i want to be able to import files in a fast way. I tried Import, but it is quite slow; ReadList takes half the time. This is the code I was using: ...
784 views

### Why does piecewise plot have a discontinuity when the function, first and second derivatives are equal?

There were some related questions to this one, but in this case we have the function value, the first derivative and the second derivative all equal (that was actually the problem I was solving). We ...
230 views

### DynamicModule, SaveDefinitions and global functions

Unfortunately, I had not checked stackoverflow, because there, the exact same behavior was already reported. Please see the Q&A "SaveDefinitions considered dangerous". Up-front, I'm on Ubuntu ...
234 views

### Summation with jump indices like 1,4,6,9?

I is easy to enter $\sum_{s=1}^{n}k(s)$ But how can I enter $\sum_{s=1,3}k(s)$ ? When I try it, Mathematica says ...
249 views

### Highlight selected curve on the plot

I have several curves on the same parametric 3D plot and I would like to highlight some curves dynamically by choosing them from list. ...
218 views

### Using FindFit to fit nonlinear ODE parameters, subject to a constraint (an inverse problem) [duplicate]

Similar to this post I am finding that constraints tend to make FindFit poor at finding a good fit. However, unlike the previous post, the constraints are required ...
116 views

### Gather dependency on list order?

I get intrigued about Gather behavior on this post. I thought that Gather was invariant under list order? Here is the result I ...
220 views

### Can't simplify Abs[a*Cos[x]]^2

Why doesn't FullSimplify[ Abs[a*Cos[x]]^2, Assumptions -> {{a, x} ∈ Reals}] simplify to (a*Cos[x])^2 but this query ...
286 views

### Elegant Matrix Combinations

Suppose you have a matrix (mxn), simplified for illustration m= {{a, b, c}, {d, e, f}} And a set of combinations (simplified for illustration purposes but can ...
154 views

### ToBoxes Respect Spaces Code

Is there a way to force either ToBoxes or MakeBoxes to respect the spacing that occurs in the code? For example is there a way ...
702 views

### Using subscript in a string

I am trying to create a string of the form $0 < d_1 < d_2 < \ldots < d_n$ For a given n. My closest attempt so far is ...
173 views

### Am I missing the point of ViewCenter?

Based on this description of 3D graphics and the associated Wolfram Training video, I anticipated that using the mouse to rotate the graphic below would rotate around the point where the three ...
262 views

### How to set FindGraphCommunities Modularity's method option

It is possible to set 2 options for one of FindGraphCommunities's methods "Modularity". They are "Weighted" and "StopTest". The question is how can one use the second option "StopTest"? What ...
328 views

### Equating two lists, element by element

Say you have two lists: listA = {a, b, c} listB = {d, e, f} How would you produce a listC that equates each of the two's ...
369 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 ...
2k views

### How to increase the number of minor ticks in a plot?

I want to increase the number of minor ticks in a plot, but I don't want to label them. I searched through this site and also Mathematica documentation, but I didn't find any solution yet. Could ...
196 views

### Access curated or locally stored data with curated data functions?

Say I have a toy package, something like: ...
944 views

### Graphical Plots of PDF and CDF

I have a joint density and distribution function that I want to plot in a meaningful way, (i.e., want to be able to see how the functions behaves as changes in x and y happen simultaneously. If ...
964 views

### Solve with v9 (issues with Subscript, Overscript, Superscript etc)

The way Solve works has changed in v9 ... in essence, to get the answers that one obtained under v8, one now often has to specify a lot more information about all ...
664 views

### How do I use RSolve to solve a system of recurrence relations?

I am trying to solve a system of recurrence relations as follows. ...
2k views

### Reading in scientific notation from C++ to Mathematica

With a text file with entries formatted as (output from C++): f[38.67] = -2.5387862698183892298317350539374412777263289550697e-05; ⋮ Is there a way to read this ...
472 views

### Is there a way to globally set when to treat a very small number as zero?

I understand that I can use Chop to force a very small number to be treated as 0 and can use ...
505 views

### How could I get the value of y[t] at each specific interpolation point?

sol = NDSolve[{Derivative[2][y][t] + Sin[y[t]] == 0, Derivative[1][y][0] == 0, y[0] == 1}, y, {t, 0, 2}] the above-mentioned differential equations can be solved ...
202 views

### Is it possible to replicate the “magic” of OptionPatterns[] with DynamicModule's local variables?

Creating richer interactive interfaces that are generated by a DynamicModule invariably requires more complex data structures and in particular, a larger argument ...
340 views

### How to output from a .NET console app to an existing Notebook in Mathematica?

I'm wondering if its possible push output from a .NET console application to an existing Notebook that is open in Mathematica. The reason I'd like this is that I want to use Mathematica as a ...
403 views

### How to perform DialogInput operation within Button

Can someone clarify how to perform a DialogInput operation within a Button? I wrote some code for that but it's not working. ...
5k views

### Importing from Excel

I'm trying to import a matrix from Excel to Mathematica. My code is: Import["desktop/stproj.xls", "xls", data, 1] The output is some weird stuff about population ...
2k views

### Trying to simplify Root expressions from the output of Eigenvalues

I am trying to calculate eigenvalues of a sparse matrix with only two distinct non-zero elements, here Alpha and Beta, which are both negative reals. Mathematica returns some complex expressions with ...
244 views

### How to work around Column cutting off a pixel row from images?

I have a problem where Column will occasionally cut off a single pixel from the top of images. To reproduce the problem, evaluate this: ...
131 views

### Customizing a graph (Dashing, PlotMarkers, Labeled)

There are actually several questions here but I thought they are closely related so I should not split into several posts. Here we go... I have the following list ...
118 views

### How does Mathematica calculate its AdjacencyMatrix[ ] and VertexDegree[ ]

I define a graph: ...
118 views

### Reflecting lines in ellipses: speed up the code?

I have the following code which calculates a list of points that a line would take after bouncing off various ellipses. ...
185 views

### Convert C program using mathlink to WSTP

I have been using heavily a custom frontend to mathematica based on mathlink. I derived it from http://library.wolfram.com/infocenter/Demos/174/frontend.c?file_id=4692 . I just learned that mathlink ...
441 views

### List Contour Plot: Delete some contour lines, but keep the colors

I'm trying to make a Contour plot of a set of data of the kind: $(x,y,f(x,y))$ What i'd like to do is to remove the majority of the iso-line and just leave two of them, but keeping the changing of ...