# All Questions

180 views

### Importing adjacency matrix from file of 0/1 arrays

Is it possible to import adjacency matrix for graph representation, from simple text file with NxN (rows x columns) of 0s/1s: 0 1 0 0 1 0 1 1 0 1 0 0 0 1 0 0
107 views

### Generalizing Characters to n-character substrings [duplicate]

I'm doing some frequency analysis on an encrypted plaintext. Tally[] and Characters[] make the basic task quite easy. To count the number of times each character appears (sorted alphabetically; ...
227 views

### What is wrong with setting one list to another within function? [duplicate]

I have built a function which carries out a set of operations given two parameters. The function looks as follows: ...
114 views

### Is it possible to Print into a collapsable CellGroup?

During rather long computation I have intermediate steps Printed with useful information which should be collected for possible use in future inside of the ...
150 views

### Converting string representation of boxes into explicit boxes [duplicate]

It is very easy and convenient to write textual labels as Strings in the WYSIWYG mode. For example, I define a short form describing a linear model: ...
340 views

### Are there any more time-efficient ways to solve a matrix equation than with SparseArray and LinearSolve?

I am trying to solve a matrix equation, with the matrix being tridiagonal. The problem I am having is that a message keeps appearing that I don't have enough memory. Here is the code: ...
507 views

### Prove (or check) an expression is positive given constraints on variables?

I'm trying to figure out whether an expression is always positive given positive parameters. When the expression is complicated, I can't do this by eye. Is there any way to make Mathematica prove ...
578 views

### Combining three R, G, B matrices into a single matrix of 3-tuples?

Working with Mathematica 8 on OSX here. I have three $1024 \times 1024$ matrices representing the counts from consecutive exposures onto a CCD with $R$, $G$, and $B$ filters on it, and am looking to ...
946 views

### Symbolically solve a system of coupled second order differential equations

I have posted a similar question in another forum where the general consensus seems to suggest that it is not possible to symbolic solve a system of coupled second order differential equations with ...
1k views

### How to make lines in Plot Legends wider?

1.- How to put DASHED lines in the Legend? 2.- How to give Style to {20,Bold} to all "Expressions in Legend? (I use LegendMarkSize for make lines wider than default fine style ) ...
1k views

### How to find non zero elements of a list containing zeros and symbols

I have a list, obtained after differentiating a list of expressions, which contains zeros and symbols, say: A = {x1^2, x2^2, x3^2, x4^2} D[A,x3] results in the ...
113 views

### How to get the indices of values in a list which are NOT an specific integer?

I got a real array A, where Dimensions[A] == {5000, 5000, 5}. Some of the values in A are ...
357 views

### Taking Top K Occurrences

Having millions of numbers in a list, I want to take top K occurrences. MMA Commonest is very slow so I write my own versions: ...
771 views

### Labeling plots without evaluation

This is my first question here so please excuse my mistakes. Let us consider a rather contrived example: ...
158 views

### How to count number of {True,True} outputs?

Do[Print[{x + y + z == 3, x + y > z}], {x, 1, 2, 1}, {y, 1, 2, 1}, {z, 1, 2, 1}] If I run this syntax I get a series of Outputs, I am trying to Count only the ...
378 views

### Travel time sweet spot using: Mathematica and Google Maps API

I want to use Mathematica to do some time minimisation calculations calling on Google Maps API for travel time data. I'm concerned with travel time, e.g. along roads (by car or walk) and not linear ...
213 views

### Zooming into animated plot

Let's say I have the following animation: Animate[ParametricPlot[{Cos[a t], Sin[a t]}, {t, 0, 1}], {a, 0, 2Pi}, AnimationRate -> 0.1] Is there a way to ...
2k views

### How does one specify Neumann conditions for NDSolve?

I have a series of functions defined in my notebook, and then want to use this to solve a diffusion-reaction type equation. At the moment, something like this works: ...
433 views

### How to change a parameter dynamically inside NDSolve

I have no idea how to dynamically update a parameter inside NDSolve. For example consider following first-order DE: ...
312 views

...
444 views

### windrose with data from Excel

How to Import data from excel and use them to Plot windrose instead? Example, {{Strength, Angle(degrees)}..} ...
208 views

### SmoothHistogram with sharp boundary [duplicate]

When using SmoothHistogram (to plot probability distribution function), I noticed that the edge of the figure is automatically smoothed towards zero probability. ...
95 views

...
284 views

### Changing Plot order for 3D printing

Alright, I got a my first 3D print done of a pseudosphere using parametric plot and a deflated sphere using a contour plot, but when I try ...
396 views

### How to exchange two arguments?

Recently, I have being using Mathematica to write my undergraduate paper. I want to use two pattern lists such as { A -> a, B -> b, c -> C, ....} and ...
646 views

### Labeling a grid

I have m = {{0, -1, -2, -3, -4}, {1, 0, -1, -2, -3}, {2, 1, 0, -1, -2}, {3, 2, 1, 0, -1}, {4, 3, 2, 1, 0}}; And a grid ...
55 views

I've been having quite a bit of trouble loading a package I wrote. I've followed the suggestions on related questions on this site, as well as on Mathematica's own pages, and still nothing has worked. ...
229 views

### How to make sure Table or Do only runs through specific values?

I often need to generate or run through very large numbers of integers (we're talking {i, 1, 10^9} and higher) and want to add certain integers to a list, say ...
29 views

### How to put the values/points in a loop into a plot? [duplicate]

I've already make the do loop..it has 200 points..how am i going to put those points into a plot?do i need to make a list@table before doing the plot?here's my loop example, ...
70 views

### Polar Plotting in Complex Plane [duplicate]

How would I plot the following functions in the polar complex plane? $$\phi={-k\over 2\pi r}cos(\theta_0-\theta)$$ and $$\psi={-k\over 2\pi r}sin(\theta_0-\theta)$$ Please ...
19 views

### Using functions as input for a function - won't simplify [duplicate]

I've defined a function P[k_] := 1/[Sqrt]2 (R[k] + L[k]) where R and L generate matrices. However the output of this function never full simplifies (even when I use the Simplify[%] functions). It ...
187 views

### Setting options of expressions similar to using SetOptions on objects

Introduction I often have the problem that in an expression, I want to change an option. If we are sure the option is not present, we could simply use ...
299 views

### Create Table of replacement rules

I want to create a table of replacement rules. ...
152 views

### How to simulate the 1-D motion of a particle under constant acceleration? [duplicate]

I am trying to represent the position of an object under freefall, but am completely lost. Here is my attempt so far: ...
123 views

### Trying to study the three points theorem of the Mobius Transformation

I am trying to study the three points theorem of the Mobius transformation. This theorem says that the Mobius transformation $M$ maps three distinct points p, q, r to three distinct points p', q', r'. ...
84 views

### Inaccuracy of Piecewise function? [duplicate]

I have the following issue and can't find a solution so far. ...
1k views

### Derivative of the Absolute Value Function in Mathematica looks very different from the actual answer

Derivative of the Abs Function in Mathematica looks very different than the actual answer. Why? How to correct this? For example I entered ...
232 views

### Writing results directly to file

I am trying to find all simple paths in a large directed graph (542 vertex, density ~ 5%) between two nodes. For this purpose, I use the algorithm from this thread. Unfortunately, my computer is ...
57 views

### Replacing list elements by other list elements [duplicate]

I am a beginner of Mathematica and need some help for the following issue. I have the following two lists: ...
223 views

### Importing an mx file into a context

Consider the following simple code which dumps the global context: var = 5; DumpSave["test.mx", "Global`"]; Now, in a new notebook, I would like to import var in ...
146 views

### LogPlot and LogLogPlot do not output their legends correctly

When I give lists of functions to LogPlot or LogLogPlot with the option of PlotLegends, ...
2k views

### How do you plot the same function with different options over different intervals?

Here is the motivation for my question. I want to plot Sin[x] over the interval 0 to 2 π, ...
215 views

### How can I create a list containing the normalized element-by-element product of two given lists?

I have to calculate: How can I create such a sum? Do I have to set the factors of each term manually (one by one), like G1 = 1, H1 = 1, G2 2, H2 = ....? ...
91 views

### Trouble fitting an explicitly complex model with the TransformedFit package

This is follow up from a previous question in which @Oleksandr R. suggested the use of a package he developed for splitting a model and data into real and imaginary parts to avoid a problem with ...
393 views

### To solve Cylinderical PDE

I want to solve this PDE. I have tried to solve it with NDSolve but found error 'Boundary values may only be specified for one independent variable. Initial ...
206 views

### TreePlot, VertexRenderingFunction and stretched vertices issue

Recently I found the following TreePlot issue. For simplicity, I took an example from Mathematica Tree Drawing Tutorial and set ...
499 views

### Performance tuning - Explicitly set Mathematica use Nvidia GPU for rendering

I feel hesitated to ask this question, but I cannot figure out a way to increase the performance. The problem is about running this featured example on a computer with both Intel HD GPU and Nvidia ...
1k views

### Mathematica gives wrong answer for an integral

When I execute the following, Integrate[ Exp[-w^2 + I w^3], {w, -∞, ∞}] I get (2 E^(2/27) BesselK[1/3, 2/27])/(3 Sqrt[3]) ...