# All Questions

210 views

### Construct a function that can generate a geometry by extruding a section

Toady I want to construct a geometry shown as below: I know the Mathematica has the functions like Cylinder, Sphere and so ...
3k views

### Exporting pictures in their correct size when using Grid [duplicate]

I have a large number of pictures, and I need to place each three of them in a grid with a certain layout. For example, if I have the following pictures: ...
183 views

### NDSolve - sampling for result during the computation

I am using NDSolve for a Langevin dynamics problem. I want to the know long term behaviour of my system ($t>1$) but it has to be simulated with very small time steps ($dt\sim 10^{-9}$). An example ...
105 views

### How to enforce numerical precision throughout a package

I developed a big package that does quite a bit of numerics. Is there a way to enforce that all numerical computations are done with a pre-defined accuracy? For example, can one use something like ...
222 views

### Non-descending Tuples

I want to get all the non-descending tuples of a list with given length, for example: f[{1,2,3,4},{3}] ...
726 views

### How to implement Kemeny-Young method? (rank aggregation problem)

Prehistory I am trying to make some statistical analysis of some experimental data, arises from measurements made ​​on an ordinal scale. I faced with the problem of rank aggregation: to get from ...
262 views

313 views

### Assign variables automatically to a function

Lets consider that I've this function: fn = a*x^2 + b*x + c; The idea here is to assign automatically the variables a, ...
160 views

question1: (code 1 something wrong, Why? and how to overcome this to achieve the next code's effect) ...
601 views

### How to export attributes or annotations to an HDF5 file?

I'm trying to export attributes and annotations to an HDF5 file. But the documentation here is horrible and there are no examples of this. I spent some time playing, but I can't get it to work. Here ...
215 views

### How to make DynamicModule work without an extra ENTER

I've been trying to learn more about DynamicModule (I do not use them, as I used Manipulate all the time). After some time ...
731 views

### Random number generation with specific distribution

I am writing a program for solving the shortest path in travelling salesman problem, with a twist that there are multiple salesmen who partition the cities among themselves, thus creating two part ...
469 views

### Automatically wrap abritrary-length text in graphics

Question: How to insert Styled text of unknown style and length into a graphics and have it wrap at a Scaled width? Attempt: I ...
1k views

### Solve system of ordinary differential equations that doesn't have an initial condition (t=0), but has an inifinity condition (t=infinity)?

I have a question for solving t -> Infinity on Mathematica. First, I have a system of ODEs: ...
9k views

### How do I solve coupled ordinary differential equations?

I have four coupled ODE's. I am not sure how to plot and solve them using Mathematica. I won't give the exact problem, but the following is something analogous: The equations ...
464 views

### How to change specific values in a List [duplicate]

In a list lst I want to change all values > 255 to 255. Why is this code not working? ...
243 views

### Programmatically opening a palette from the Palettes menu

How can I programmatically open a palette from the Palettes menu? Is there a Front End token for this? Motivation: Certain settings for the palettes that are installed into standard locations and ...
3k views

### How can I scale tick marks without scaling my function?

Take this plot for instance: It shows power in W, but I'd like to see it in µW, so that I get 200, 400, 600,..., which is much more readable. Is there a way to do this without scaling my ...
369 views

### How to cancel floating point factors?

I am currently having problems with some floating points. I have a function, which gives as an intermediate result (for example) ...
3k views

### Function for Autocorrelation

Is there a built in function to compute the autocorrelation of a signal ?
334 views

### How to close the front end so I can clear all Global variables?

I first thought that doing Quit[] in a cell, or Evaluation->Quit kernel, is supposed to remove all Global variables, but I have a case where this is not happening, then I read that there is a command ...
163 views

### Goal optimization: finding the best combination of capacitors and resistors resulting in given properties

I want to edit @MarcoB answers (because the code he gave doesn't answer the question appropriately)->(the function that need to be optimised is not implemented as asked) But it seems like I am having ...
197 views

### How can I encrypt/decrypt a directory?

I'd like to use Mathematica 10's new Encrypt and Decrypt functions to secure files and folders on my mac. Here's what I have so far but something goes wrong along the way, since by the end of this ...
97 views

### Why is Transpose Dataset slow in one direction

Transpose is faster when it distributes Keys at the 2nd level of a Dataset than when it factors them out. ...
262 views

### How to fit parameters in a system of coupled differential equations

Problem description: I'm studying a chemical reaction that can be modeled by a system of coupled differential equations, and I want to use measured data to determine the parameters that appear in the ...
226 views

### mathematica use too much memory to Import large dat file

Err... When I try to Import a .dat file by dat = Import["D:\\TIEGCM\\solar_input\\omni_m_all_years.dat", "Table"]; or ...
412 views

### How can I draw a square root spiral? [duplicate]

I found this picture on the net. How can I reproduce it in Mathematica?
119 views

### Rasterize is influenced by WindowSize of the notebook where I run it

The two images show what I mean: Actually, the problem I have is that I need the images as in the second case, that's the whole expression in one row. In realty, the code is even more complex and ...
105 views

### Can I modify Ctrl— to insert Indexed expressions?

For me, Indexed[x, n] is a much more useful and versatile construct than Subscript[x, n]. I would therefore like to modify ...
307 views

### Using GraphData to generate all directed graphs with n vertices

Using Combinatorica, it was possible to generate unlabeled (non-isomorphic) directed graphs of $|V|=n$. Here the example is for $n=4$: ...
443 views

### Creating a fast random array generator

I want to create N x N array of random numbers. (N is an integer). The constraints are, each element should be between 0 to l(integer) ( here 0<= l <= N) and the sum of elements in each row ...
92 views

### A simple experiment to understand CUDAFunctionLoad

In an attempt to answer my own question (Beginner CUDA: two dimensional blocks and two dimensional threads?). Please excuse the long post, it contains for examples I constructed as an experiment to ...
551 views

### Finding minimal distance between two surfaces

This code will display two parametric surfaces: ...
305 views

### FindPeaks does not smooth noise on peak?

I have experimental data which is noisy. My objective is to find the peaks. Here is a short part of the data. ...
122 views

### Is there a way to accelerate buffering to the screen

I have an application that does a bunch of small computations, mostly Table management, and logic around loops. It takes seconds to execute. However, when I turn on debug (a variable I set for ...
204 views

### How to re-parse (or re-map) character '.' to user-defined function

The default behavior of the character . between two non-numeric characters is to be interpreted as the infix of the Mathematica function ...
523 views

### Contour plot with points and line together

I have drawn a contour plot like attached in the figure. Now, what I want is points along with the contour lines. For example: I have a data set like: ...
204 views

### InstallR on OS X with external R installation on 10.0.1.0

I had no problem to follow the instructions given at InstallR on OS X with external R installation to get an external R working with Mathematica 10.0.0.0. However when Mathematica was updated to ...
60 views

### CompiledFunction with multiple outputs of different ranks [duplicate]

Below is a simple compiled function f that gives multiple outputs. ...
684 views

### How to track objects in video

I have a video that contains object moving in one direction, is it possible to track the objects and get information like object moving speed, object length and coordinates etc.? An example would be I ...
763 views

### Circular membrane vibration simulation

I'm new in Mathematica and I'm trying to simulate the vibration of a circular membrane for math project but I don't even know how to start. The wave equation describes the displacement of the ...
110 views

### How to create a CDF “on the fly”?

I don't know if I have asked the question the right way: As CDF is essentially a simple text file, I would like to create it "on the fly" without saving it to the hard drive. I would like to give a ...
337 views

### BarChart that lines up with dates in DateListPlot

I am trying to create a chart similar to the view offered by TradingChart, but with custom data not relating to finance. ...