5
votes
1answer
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 ...
5
votes
2answers
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: ...
5
votes
1answer
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 ...
5
votes
1answer
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 ...
5
votes
3answers
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}] ...
5
votes
1answer
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 ...
5
votes
1answer
262 views

WhenEvent method with 3 conditions

I am trying to solve system of differential equations below $$x''(t)=-2.25cos(1.5t)-x(t)-x'(t)$$ $$y''(t)=-1.125cos(1.5t)-4y(t)-y'(t)$$ $$z'(t)=\begin{cases}x(t)-(1+y(t)), & \text{if } ...
5
votes
1answer
213 views

Make dynamic controls from existing list

I have a list of variables (c1,c2,c3,c4), each with its ...
5
votes
1answer
3k views

Solving a system of linear equations modulo n

I have a system of linear equations $$ a+b+c \equiv 31 \pmod{54} $$ $$ 4a+2b+c \equiv 3 \pmod{54} $$ $$ 9a+3b+c \equiv 11 \pmod{54} $$ What should I input (I'm using ...
5
votes
1answer
177 views

Text as plot axes values

I have some chemical data that I am plotting using ListLogPlot. ...
5
votes
3answers
370 views

Switching among view points in a Manipulate expression

Edit: Some additional viewpoints were included to make it easier to test. Here's code for an alternative function, the graph of which is a bit less symmetric. Feel free to use either code set: ...
5
votes
1answer
3k views

finding poles of a function

Is there a command to find the poles of a function $f=f(z)$? example: let $$f(z) = \frac{1}{z^2-1}$$ then we know that the poles are at $z=\pm 1$ but is there a special command in mathematica to do ...
5
votes
1answer
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, ...
5
votes
1answer
160 views

question about Inner [duplicate]

question1: (code 1 something wrong, Why? and how to overcome this to achieve the next code's effect) ...
5
votes
1answer
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 ...
5
votes
2answers
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 ...
5
votes
1answer
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 ...
5
votes
1answer
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 ...
5
votes
1answer
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: ...
5
votes
2answers
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 ...
5
votes
6answers
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? ...
5
votes
1answer
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 ...
5
votes
3answers
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 ...
5
votes
3answers
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) ...
5
votes
4answers
3k views

Function for Autocorrelation

Is there a built in function to compute the autocorrelation of a signal ?
5
votes
2answers
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 ...
4
votes
1answer
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 ...
4
votes
2answers
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 ...
4
votes
0answers
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. ...
4
votes
3answers
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 ...
4
votes
1answer
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 ...
4
votes
4answers
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?
4
votes
1answer
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 ...
4
votes
2answers
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 ...
4
votes
2answers
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$: ...
4
votes
4answers
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 ...
4
votes
0answers
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 ...
4
votes
2answers
551 views

Finding minimal distance between two surfaces

This code will display two parametric surfaces: ...
4
votes
2answers
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. ...
4
votes
2answers
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 ...
4
votes
3answers
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 ...
4
votes
3answers
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: ...
4
votes
2answers
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 ...
4
votes
0answers
60 views

CompiledFunction with multiple outputs of different ranks [duplicate]

Below is a simple compiled function f that gives multiple outputs. ...
4
votes
1answer
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 ...
4
votes
1answer
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 ...
4
votes
1answer
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 ...
4
votes
1answer
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. ...
4
votes
2answers
316 views

Keep kernel running for execution of scheduled task

How can I keep a kernel running until all scheduled tasks have completed? For example upon running the following script bazinga.m: ...
4
votes
1answer
186 views

Importing malformed XML: Import[… “XMLObject”] vs ImportString[…, “XML”]

It appears that Import[ url , "XMLObject" ] is more forgiving of improperly formatted XML than ImportString[ string, "XML"]. For ...

15 30 50 per page