# All Questions

66 views

### Need Help with Output/Code Optimization Conparative Statics with System of Equations and Matrices

I have a system of equations (equilibrium conditions) and would like to evaluate how changes of exogenous variables affect the endogenous values. In step 1, I state the equilibrium equations and some ...
56 views

### Error Interpretation with NIntegrate, max. possible accuracy/precision

I guess the right question to this is: Which method is used at NIntegrate with Mathematica 8 as default and which is used with Mathematica 9 as default? ...
99 views

### How to constrain the generation of all possible orderings?

Here is code from Simon Woods' answer for getting all possible weak (equal ranks allowed) orderings for $N=3$ objects: ...
126 views

### Block Matrix Algebra with Mathematica

I have come up with some BlockMatrix Algebra for Mathematica to make notations easier. I have the following: ...
110 views

### How to speed up Manipulate with Graphics3D

How do I speed up the Manipulate of the Graphics3D objects here? It is currently painfully slow, and I'm at a loss. I have reviewed many other posts and implemented what I could based on them, but it ...
204 views

### What are the algorithm details of FindRoot?

The Help page of FindRoot says: "by default, FindRoot uses Newton's method (Newton-Raphson) to solve a nonlinear system". But I ...
39 views

### How could I implement, in C++, Mathematica's capability of rationalizing machine reals? [migrated]

If I have a variable x bound to a machine precision real in Mathematica, I can use y = FromDigits[RealDigits[x]] then y is ...
89 views

I want to be able to compute with explicit exterior algebras of vector spaces. For example, given a real vector space $V$ of $3 \times 3$ matrices, I want to consider expressions of the form $v\wedge ... 2answers 88 views ### Upsampling matrix by inserting zeros inbetween elements I want to essentially take an image with$n \times n$pixels and expand it into a sparse array, spacing out the pixels by a factor$2$or$3$. Each pixel in the input image occupies one of the corners ... 2answers 172 views ### How to make use of an interpolating function outside of Mathematica? [duplicate] I'm currently working on a project where I have to solve some partial differential equations. Initially, I made some approximations so that an analytic solution could be obtained, and my ... 0answers 109 views ### Why DSolve and NDSolve give different answer Consider these code, which solve the same equation using DSolve and NDSolve, why do they give different answer? Which one is ... 1answer 116 views ### Having trouble fitting data using NonlinearModelFit I'm trying to fit data = {{2002, 45000}, {2004, 90000}, {2005, 120000}, {2013, 211000}}; to an exponential function ... 0answers 48 views ### Can you set up a remote kernel for computation and a local kernel for predictive interface? I am able to launch remote kernels from my Windows box to our Linux cluster that has the data I need and the capacity to run analysis (numerous & speedy cores, spacious memory, etc.). Works ... 1answer 148 views ### Why is multidimensional Reverse slow? I have found that multidimensional Reverse is ~10 times slower than exact -1 ;; 1 ;; -1: ... 2answers 65 views ### Problem with plotting a function consisting of HeavisideTheta(s) I have the following data ... 1answer 115 views ### How do I select a random sample without replacement? [closed] What is the module that selects a random sample of size k (without replacement) from a given population of size n, involving the command Subsets. 1answer 67 views ### What is going wrong when I save an animation as a SWF-file? The first I am trying to export animations from Mathematica to a file and then to LaTeX. Don't assume I know anything about what I'm doing. The following definitions defines the still image of a ... 1answer 87 views ### Plotting the set where$F(x,y)\leq0$holds [closed] I was using Wolfram Alpha to explore some set which is defined by an inequality. Somehow I was not able to reproduce the picture with mathematica. What is the best way of plotting a set defined as ... 1answer 148 views ### How do I indent C code generated by SymbolicC? I'm continuing to experiment with the SymbolicC` package, and it's crucial to be able to inspect the generated code in order to do, well, anything useful with it. ... 1answer 121 views ### CompiledFunction returns machine numbers smaller than$MinMachineNumber

When thinking on the workaround for this LogLogPlot bug suggested by halirutan I noticed that CompiledFunction actually can ...
109 views

### Weighted mean of complex exponential function using NIntegrate

I have defined the following functions: ...
68 views

### Is it possible to get the transformation PrincipalComponents uses to transform data?

As far as I can see PrincipalComponents[data] just gives data in the principal component basis. The problem is that after this, I would like to transform new data ...
31 views

### Help writing a recurrence relation in MATLAB [migrated]

I have this recurrence relation which is defined as: $x_{j+1}-2x_j+x_{j-1}=1$ $j=1,2,...$ My task is to write two MATLAB functions, the first one should generate a fixed number $n$ of elements of ...
111 views

### How to Clear variables represented as a list of strings?

Say I have a string list called fullpara fullpara={"width", "long", "line", "distance"} And there are corresponding variables ...
94 views

### How to ListPlot over an Imported Image

I would like to plot the gray scale (average of RGB) of an imported image, and combine the graph with the imported image. How can I do that in Mathematica? Say, the imported image is a 800x5-pixel ...
132 views
+150

### NDSolve::ndcf: Repeated convergence test failure. How to solve?

I am trying to simulate a system of $n$ pendulums with some friction in Mathematica 9. This is the code I am using: ...
98 views

### How do I convert from NAD 83 State Plane Coordinates to Latitude and Longitude?

I am trying to convert NAD 83 State Plane New York Long Island coordinates to Latitude/longitude. Below is my code - what am I doing wrong? ...
90 views

### Alternating Axis Labeling between Left and Right Axis

I'm using the following to label a MatrixPlot: FrameTicks -> {{yticks, None}, {None, xticks}}, I'm labeling these ticks with text. It is impossible to get the ...
58 views

### use variables again after derivation

I have something the following form: a= 3*k; b=c*d*a; h[k_]=b*k^3; so if I use l[k_]=D[h[k],k] I get ...
105 views

### Finding common roots of a specific system of polynomials

Some of my colleges are interested in finding common zeros of the following four polynomials: ...
42 views

### Why are fonts in my notebooks grainy after transferring to a new machine? [duplicate]

After transferring Mathematica (and successfully transferring my license) to a new machine (a Retina MacBook Pro) all the fonts in my documents look jagged: How do I get Mathematica to show smooth ...
34 views

### Problem with using NDSolve function [closed]

I use Mathematica 9.0 and I am trying to solve a system of coupled differential equations using NDSolve. My two equations are ...
39 views

### Different ordering for KroneckerDelta?

I have an expression like this: Assuming[m [\Element] Integers && n [\Element] Integers, 1/2 I J n (4-m n+n^2) KroneckerDelta[m,-n]]//FullSimplify Now, ...
141 views
+50

### p-iteration algorithm to solve Lambert's problem for interplanetary trajectories

I've been reading up on using the p-iteration method to solve Lambert's problem for choosing the correct interplanetary trajectory between two planets given the ...
57 views

### Simplify ignores DiracDelta contribution from Coulomb sources

Executing the following line, Simplify[Div[Grad[-1/Sqrt[{x, y, z}.{x, y, z}], {x, y, z}], {x, y, z}]] yields 0. However, this is incorrect, since ...
107 views

### Small problem at equation solving

I have $2$ equations in $2$ parameters which involve integrations. The limits of the integrals can not be defined analytically. They also require equation solving and eventually I couldnt incorporate ...
122 views

### Running CUDA or OpenCL using Mathematica on Raspberry Pi

I am wondering if someone can use CUDA and (or) OpenCL on a Raspberry Pi as in any normal PC equipped with a GPU. The main processor runs at 700 MHz and maybe will be slow for some imaging ...
76 views

### Why the index in command 'Table' does not work?

I type the following command line Table[D[#1,varx[[i]]] &,{i,3}] where the varx is a vector of dummy variables ...
73 views

### Legends in a combined Plot and ListPlot

This question is related to the previously asked question Legends in combined Plot and ListPlot. Since Mathematica 9 introduced new option PlotLegends, I was ...
336 views

### Concatenation of lists in a Fibonacci-like pattern

I am trying to create a List of elements that follow the general pattern: $$X_{n+1} = X_n X_{n-1}$$ where the operation on the right hand side is concatenation, i.e., joining. I want to achieve the ...
82 views

### Fastest way to concatenate many text files in a given directory

I have about 1 million .txt text files in a directory which I would like to all concatenate in one single text file (separated by a newline character "\n"). Because of the number of files and their ...
37 views

### Custom Errorbar-Function

I wanted to have a better control on the ErrorListPlot, so I defined a custom ErrorBarFunction: ...
76 views

### J/Link: getArray2() returns wrong array

I want to convert a matrix from Mathematica to an int[][] in Java. I use the code below: ...
483 views

### How to plot a certain surface? What is its parametric equation?

The surface show below is very beautiful; however, I don't know its function either as an implicit function or in parametric form. Anyone have an idea about it and how to draw it with Mathematica?
62 views

### With limited memory, how can I export very long Print results into a PDF or a notebook file?

I have a script with a long loop and very long formatted outputs like the following example code: ...
47 views

### What is the algorithm for computing Dirichlet characters? [closed]

I am using Dirichlet characters with the DirichletCharacter[] command in the code below: ...
44 views

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

I got a real array A, of which the Dimensions[A] is {5000,5000,5}; Some of the values in A are -1 , others are not. How can I Position[] the indices of those values which are NOT -1?
112 views

### Google speech API . Speech to text recognition with Mathematica

Has anyone tried to use the Google speech API with Mathematica? This would open up exciting possibilities when combined with the free form input already available in Mathematica and with the recently ...