# All Questions

6 views

### Weird error with syntax

Since I don't know how to reproduce this error with simpler code, let me reproduce it exactly in form I encountered it. ...
157 views

### Brackets around each item in matrix

I have a matrix where every item in the matrix has its own brackets that I do not want. How can I remove the brackets around each item?
19 views

### RandomPoint works with a 2D ImplicitRegion but fails for any higher dimension

This is inspired by this answer which features code that I cannot get to work at all, and I tried to figure out why. It boils down to using the function ...
247 views

123 views

### Why is Random faster than RandomReal?

As of version 6, Random[] was superseded by RandomReal[ ] etc, but both still work perfectly well. Playing with some timing ...
141 views

### How do I plot a space curve as a ribbon?

I know Mathematica has a built in Tube function, but I want to be able to change the parameters of a ribbon and visualize that. Is this possible? How do I do this? ...
108 views

### How to draw a moving point with time?

I am new to Mathematica. Try to draw a point moving with time. Like at t=0, a point is at p1(coordinates are random numbers); at t=1, this point is at p2. And there is always ONE point on the graph. ...
116 views

### Plotting function with unique symbols [on hold]

I would like to plot a function which involves multiple symbols created using Unique. Consider the following simple example. ...
30 views

### NDeigensystem returns error due to mesh discretization when calculating vibrations of a cantilever

There was an transcription error in the code I provided in a previous post: NDeigensystem returns complex non-hermitian error for the calculation of vibrations of a cantilever This resulted in it ...
110 views

### Unexpected behavior from Indexed

I was going to include Indexed in this answer, thinking that it operated much as a List-only ...
76 views

### Why some alpha + Evaluate return Pod, some return only return an Entity?

Why some alpha + Evaluate return Pod, some return only return an Entity? Here is an example One guess is some direct match/index will return a Entity, if with some NLP of Input, then will return ...
70 views

### I want to compute the derivative of Black and Scholes option

Good evening to everybody, my question is about computing the derivative of a Black and Scholes option and to draw it. My code is ...
47 views

### ParallelTable should distribute dedicated evaluation range to different kernels

I have 4 kernels and would like that in ParallelTable: ...
168 views

### How to generate two group of $n$ random numbers in $U(0,1)$ such that sum of these two groups equal? [on hold]

I want to have two groups of $n$ random numbers $u_i$ and $v_i$ in $U(0,1)$, such that $\sum u_i = \sum v_i$ What I tried is: I can firstly get $u_i$ by ...
226 views

### Combinations of multiple matching patterns

I wonder if there is any nice way to combine DownValues (or any other suitable rule-/pattern-/function -based Mathematica construct) when multiple patterns match an expression. Let me explain what I ...
277 views

### Split according to List and apply rule

I have a list which looks some thing like this {a1, a2, a3, a4, a5, a6, a7, a8, a9, a10} Now I want to split it according to lengths ...
2k views

### Compiling more functions that don't call MainEvaluate

I would like to use Compile with functions defined outside Compile. For example if I have the two basic functions ...
88k views

### Where can I find examples of good Mathematica programming practice?

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...
44 views

### Creating Vector Field Plots for an Implicit Equation [on hold]

I am having difficulty creating a vector field plot for the implicit equation Log[(2x-1)/(x-1)] == t (* Did your best to use Mathematica syntax *) Where ...
129 views

### What kind of Arnoldi method is used in Mathematica?

Can someone give me a bit more information about what mathematical method Mathematica is using, (preconditioner, filtering-restarting, deflation) in the Lanczos implementation when I input something ...
165 views

### Evaluation of Alternatives

I recently stumbled upon a few examples that suggest patterns containing Alternatives do not evaluate for individual alternatives. For example: ...
60 views

### How to define a complicated function inside the body of Compile?

I want to compile a function in a way to keep its memory footprint down. In the example below, I am trying to compile a function f that makes three calls to ...
43 views

### Why doesn't mathematica evaluate the cells?

I have the following code in mathematica. Everything was ok and I was simplifying but suddenly mathematica crashed and after that it seems that it doesn't evaluate the functions. ...