1
vote
1answer
64 views

RandomVariate form a Specific Distribution with Restrictions

There are a lot of questions about generating random numbers form both uni-variate and bi-variate distributions. Mathematica has a lot of built in distributions for that purpose. However, I could not ...
4
votes
1answer
109 views

DateList does not output the correct time, but Date does

I noticed a strange thing when trying the new astronomical data functions in Mathematica 10 on my Raspberry Pi. The Sunrise and ...
0
votes
0answers
51 views

Simple recursive function?

I'm new in Mathematica and need some help. I'm trying to make a recursive function but I'm not sure how to iterate through more than one item. To be more clear, take this pseudo code for example: ...
4
votes
1answer
66 views

Why is C-compiled (but not WVM-compiled) code so slow in Manipulate?

Here is a small section of code from this SE question which computes the real part of the dilogarithm (the upper limit of the sum is increased for demonstration purposes): ...
3
votes
1answer
221 views

A bug fix to mathematica 10.0.1.0

There is a bug in the Wolfram Symbolic Transfer Protocol Development in C (Windows). I described it in the next answer by myself, from which I summarize: One cannot successfully compile the ...
9
votes
2answers
165 views

Sampling phase space uniformly for a given energy

For example, for the 1D harmonic oscillator, the energy is given by: $$ E = \frac{1}{2 m} p^2 + \frac{m \omega^2}{2} x^2 $$ where x is position and p is the momentum. I would like to sample phase ...
1
vote
1answer
45 views

Formatting output for readability

I would like to suppress the argument [0, 0, 0, 0] of K in the output of ...
6
votes
2answers
168 views

Mathematica 10 ListPointPlot3D PlotTheme bug?

I am using Mathematica 10 to generate a 3D point plot of a crystal lattice structure. I wanted to set the PlotTheme to ...
3
votes
1answer
142 views

The front end encountered an error while processing a “NotebookPredictions” packet

I occasionally get the error The front end encountered an error while processing a "NotebookPredictions" packet. I cannot find any documentation for this error message online. It does not ...
2
votes
1answer
55 views

FullSimplify wont simplify to expression with lower SimplifyCount

I have been trying without success to get FullSimplify to work on some trigonometric expressions. It refuses to convert them to forms that are clearly much ...
2
votes
0answers
53 views

pattern matching and applying a function, not working as expected [duplicate]

Consider the following code G[x, y] /. a_[b__] -> Total[a @@@ Permutations[List[b]]] I expect it to give G[x, y]+G[y,x] ...
2
votes
2answers
129 views

Color Transfer from colored image into grayscale image

At first I did this where image is a grayscale image and example is a colored image ...
0
votes
0answers
48 views
2
votes
0answers
87 views

How can I transfer colors from first image into second image? [duplicate]

How can I transfer colors from first image into second image, where every object from the first image should take the same object's color from first image. This images are only an example. this is ...
1
vote
1answer
43 views

Optimizing alphametrics code

First of all, thank you all in this great community. I have been reading a lot of threads about Mathematica optimization learning things like using Compile ...
0
votes
0answers
52 views

A reliable CPU timer [on hold]

I was evaluating a sample program and at the end evaluated TimeUsed. When I ran the program for the first time TimeUsed was ...
20
votes
4answers
3k views

K-means clustering

In MATLAB, there is a command kmeans() that divides an array into $k$ clusters and calculates the centroid of each cluster. Is there any command in Mathematica to ...
-2
votes
0answers
32 views

How do I put single velocity and get rid of initial and final velocity? [duplicate]

I want to get rid of terminal and final velocity. I only want one velocity as a whole in the code below.How do i get that?Also could you please tell the difference of using "ParametricPlot" vs "Plot" ...
0
votes
3answers
63 views

Listing all cubic order derivatives of a function of 4 variables

What would be the best way to list/print all cubic order derivatives of a function of 4 variables? I was thinking about iterating Derivative[i,j,k,l][func][0,0,0,0] ...
3
votes
3answers
86 views

ReplacePart equivalent for Associations

I have a fairly complicated Association. I wish to use/create a function such as ReplacePart to operate on certain Keys within this multi-level Association. Here's ...
1
vote
3answers
73 views

How can I use the command `Minimize` of this trigonometric function? [duplicate]

I want to find the minimum of the function $\sin^6 x + \cos^6 x$. I tried Minimize[{Sin[x]^6 + Cos[x]^6, 0 <= x <= 2 Pi}, x] I got {Cos[2 ArcTan[1 - ...
-3
votes
2answers
99 views

Why does this function inside FindRoot fail to evaluate?

Can someone help me understand why function mu found below does not execute when everything before it seems ok. ...
3
votes
1answer
46 views

How to reflect the entries of a square matrix about its anti-diagonal?

I need help with writing the mathematica code to reflect the entries of a square matrix about its anti-diagonal. I know to do it about the main diagonal using ...
0
votes
0answers
33 views

plot both parts of a two-sheeted hyperboloid [on hold]

Is it possible to plot both parts of a two-sheeted hyperboloid in one input with the following parametrization, meaning that the z-component would be plus minus ...
4
votes
2answers
148 views

Animate skips frames and hard to control speed.

I browsed similar questions related to Animate jerkiness like here, but haven't found the right options to control animation rate while also displaying all frames: ...
3
votes
2answers
101 views

Help with building matrices

I am a complete beginner in Mathematica and I have a small problem. I have this three matrices (A,B and C) and with them I have to build larger matrix M which looks like this. What would be the ...
9
votes
1answer
225 views

representation of custom deformation on a meshgrid

I am trying to represent 2D deformations on a rectangular grid. In Mathematica 10, there is a method to solve the elastic differential equations and then represent the deformation as presented here: ...
0
votes
0answers
19 views

How can I make an animation with data points imported from txt file using ListAnimate/ListPointPlot3D? [on hold]

I want to make an animation about a ball moving. I do not have an equation for the trajectory, but only spatial coordinates in three dimensions. For example, (x , y , ...
2
votes
2answers
108 views

Function WeatherData fails

If I use WeatherData[] only some of my requests work. For example if I use WeatherData[{"Chicago", 3}] I get the correct output: ...
7
votes
3answers
173 views
8
votes
3answers
213 views

Disable templates for user defined functions with usages

It appears that fixing the template system is low on Wolfram Research's priority list. For my package, I have defined Usage info for my functions involving lots of ...
4
votes
2answers
143 views

Extracting ragged array from an image

I have a list of points, which represent positions of peaks in an image. The nature of the image itself shouldn't matter, as I already have the peak positions. As a simple example, consider the ...
0
votes
0answers
35 views

Derivation: How do I derivate this [migrated]

How do I deveriate the following expression? The problem I have is the n in d^n. This expression is part of a bigger task of mine : Show via complete induktion that is true for all n from ...
1
vote
1answer
39 views

Using If statement for more than two cases [on hold]

I want to use the If statement for three different scenario. Can someone help me out? Pls also indicate if there is a better function to do that. This is an example ...
0
votes
0answers
20 views

Maximization of n-variable and n-constraint in matrix form

I am trying to do some maximization using matrix algebra: very simple one is with n = 3 as the following: ...
15
votes
1answer
385 views

How to add named characters to Mathematica 10?

It appears that native support for the Klingon alphabet has been removed from version 10: \[KlingonA] Syntax::tsntxi: "\"!(\[ KlingonA])\" is incomplete; more ...
0
votes
0answers
11 views

Combinatorial arrangements notation [migrated]

I have a program that executes 2 kinds of operation with bytes and bits sets: BYTE OPERATION related to BIT POSITION and BIT OPERATION related to BIT POSITION The first operation provides a kind of ...
0
votes
0answers
78 views

What is the difference between Array and Table?

I cannot understand the difference between Array command and Table. I can reproduce the example in ...
1
vote
2answers
73 views

Incorporating the minimum and maximum of the function in a Dynamic plot

I'm working on my project for class and it's supposed to be a graph that can take functions from the user and display it along with finding the max and min of the graph. But I just don't know how to ...
11
votes
3answers
3k views

Solving a time-dependent Schroedinger equation

I want to solve the time-dependent Schroedinger equation: $$ i\partial_t \psi(t) = H(t)\psi(t) $$ for matrix, time-dependent $H(t)$ and vector $\psi$. What is an efficient way of doing this so ...
2
votes
1answer
52 views

Change default output font globally

I'd like to change my default output font to "Helvetica Neue" in version 10. The following shows the only thing I have found in Option Inspector, which would ...
0
votes
0answers
47 views

Bug in parallel computing

The following is a simplified example. We construct a library function f and another library function g, in which the library function f is called. ...
0
votes
0answers
48 views

I want to get some inputs from user [on hold]

I'm new to mathematica. i have a small project: get an equation , a number n, a number x and a number y and a number h, then using euler formula calculate nTh iteration ... My code is : ...
6
votes
4answers
149 views

Generate list of strings from a list of assigned variables

How do I generate a list of strings from a list of assigned variables? Eg. Convert ...
0
votes
1answer
52 views
2
votes
1answer
103 views

How to use slots and patterns to reduce repetitive calculation?

This is kind of complicated... How can we make MMa calculate values of a function before doing multiple pattern or slot substitutions? Answers to similar questions didn't cover the case where the ...
0
votes
0answers
34 views

Plotting the real positive solution to a parametric equation [duplicate]

I have the following parametric equation $$ x^2-a=0 $$ where $a$ is a given parameter. I would like to plot the nonnegative real root ($\sqrt{a}$) using NSolve as $a$ varies from $0$ to $1$. Can ...
4
votes
0answers
71 views

My code does not give the same results on mathematica 9 and 10

I have developed last year an algorithm using mathematica 9. In this algorithm, I remember that coordinate system of Image and Graphics are not the same. However, in mathematica 10 the coordinate ...

15 30 50 per page