All Questions

228 views

Plotting derivatives of B-splines

I am trying to solve an electrodynamics problem numerically by using B-splines a basis function. Please don't ask me why, but if you really wanna know, here is the assignment. Using the following ...
114 views

How can I solve this system of functional equations?

I would like to use Mathematica to find maps a, b, c, d, e, f such that ...
177 views

How can Private functions be made completely opaque?

I want to make Private functions. From my point of view, being a Private function means that the function is not accessible from other packages. For that purpose I wrote the following code. But my ...
139 views

Statistical analysis of data-list with recurring x-values

I have a list of data as follows with repeated x-values: ...
306 views

How can I make private functions inside packages

I want to make private functions.for that purpose,I wrote the following code. BeginPackage["Test1"] Begin["Private`"] function1[x_]:=x End[] EndPackage[] I ...
386 views

Probability density histogram with unequal bin widths

I am confused by output of Histogram and HistogramList for probability density ("PDF") when ...
141 views

Cusom PopupMenu file selector

Lately I come across what I think not uninteresting problem which is a good exercise for the usage of Dynamic. Assume you have files in a directory structure (a ...
133 views

How can I decrease number of lines of code in a notebook? [closed]

I have too many lines of code and I want to reduce the line count. For example, I have a notebook with 2000 lines of code, and i want to hide some of it so there are less than, say, 200 lines. Can ...
160 views

How do I plot Numerical Range of two hermitian matrices

Let $A_1$ and $A_2$ be two $3\times 3$ hermitian matrices. Then their numerical range is defined as two-dimensional set \begin{align} \mathbb{S}=\{\left[u^HA_1u,u^HA_2u\right]\in ...
204 views

Replace elements in a list

Suppose that I have a list: ...
957 views

Write C/C++ programs calling Mathematica functions

I need to write a C/C++ program and call some functions in Mathematica especially those like Solve or NDSolve. The problem is ...
180 views

Derivatives of list elements

Could someone explain the odd behavior of the Derivative function when drawing arguments from lists? We have, ...
94 views

Compiled function crashes kernel when trying to list over different length arguments

I'm trying to speed up a tally/binning operation that I have to run many times. I have many lists of between 1 and 10 numbers from the range [1,5] and I want to ...
106 views

SetPrecision with indexed variables

I have an expression as below: ...
387 views

Infinite Expression Error from NDSolve

I am trying to solve a differential equation numerically. So I have ...
609 views

Mathematica giving infinity as a random number!

I am trying to generate several random numbers from normal distribution using Mathematica. The following is the relevant code: ...
158 views

Map several functions in one routine

I have several functions, let's assume they are: func1[x_]=x; func2[x_]=3*x-5; func3[x_]=0.1*x^2; and a lot more like these. For each and every one of these I ...
147 views

List comparison in constraints for Minimize

I am trying to solve an optimization problem, a simplified version of which is as follows: ...
92 views

shortest paths in probabilistically weighted edges? [duplicate]

I understand Mathematica can find shortest paths. However, is it also able to find the most probable paths? I mean this is a case where edges are given probabilistic wights (from 0 to 1) and the most ...
159 views

Exploiting self-adjointness when changing basis

I am using Mathematica to analyze a real, self-adjoint matrix $H$ of the size $32 \times 32$, which comes from a physics problem. In the picture there is also a matrix $Q$ which commutes with $H$. I ...
123 views

How to work with Interpolated Functions? [closed]

I am just a beginner and struggeling with experimental data and further processing in Mathematica: I first constructed a table from two columns (t20 and J20) in Excel: ...
128 views

Nest for large value of n

I am working on a problem to find the Feigenbaum constant. In this problem I have to get $f^{2^n}(1/2)$ with $f(x) = kx(1-x)$. I use Nest to get $f^{2^n}(1/2)$ but ...
162 views

Conjugate and simplify

I want to get a cosine from taking the real part of a complex exponential: $cos(x) = Re(exp(i x))$. What I do in Mathematica is ...
202 views

Import large amount of data with time stamps

I have a large data file (150 000 lines) which I want to import in Mathematica. The first few lines look like this ...
96 views

Significant platform-dependent efficiency when importing data?

I'm curious, as I understand that answer this way: If you are using a Linux derivative or something like cygwin on Windows, then this is an efficient solution for reading only the third field ...
123 views

Solving a system of equations

Mathematica doesn't want to solve my exact system with 3 equations and 3 variables. ...
127 views

How can I stop DiscreteMarkovProcess[] from relabeling vertices?

I'm attempting to calculate the mean first passage time between two vertices, $v_1$ and $v_2$, provided some undirected graph $G$. However, I noticed that running the following script: ...
275 views

Problem with NIntegrate when WorkingPrecision is specified

I am trying to evaluate this integral numerically: $$\int_0^{\infty } m \exp (-m) J_1(m){}^2 \, dm$$ Everything is OK when only the integration method is specified: ...
210 views

List plot 3D not showing correct data

I have a list of values of the form {{a_1,b_1,c_1},{a_2,b_2,c_2}...} where a goes from 0 to 30, ...
308 views

Efficient drawing of convex polyhedron given a set of points [duplicate]

I have a set of points in the 3D space and I want to draw the bounding convex polyhedron of those points. A very naïve solution would be to draw a triangle between every three points: ...
265 views

Mathematica not able to confirm its own solution to differential equation

I type the following into Mathematica: DSolve[q''[x] + 2 x/(x^2 - 1) q'[x] - 4*q[x]/(x^2 - 1) == 0, q[x], x] It gives me the result ...
77 views

What algorithm is Mathematica using for FirstPassageTimeDistribution[]?

What algorithm is Mathematica 9 using for FirstPassageTimeDistribution[]? Is it attempting to use PseudoInverse[] on the ...
608 views

Peirce's quincuncial projection

The Peirce quincuncial projection is the cartographic projection of a sphere onto a square. In short, I would like to see it implemented in Mathematica. Here is my code: ...
491 views

How do you draw a straight line with PolarPlot?

I can't figure how to draw a line with PolarPlot. A vertical line through a is $r \cos(\theta) = a$, so ...
160 views

iterate method to find roots

This code gives the roots (lambda-values) of eq1 by using iteration. ...
519 views

Viewing Mathematica Demonstrations Project Code

I hope I am going insane and the I'm not seeing the snake about to bite me... How does one view the code in the demonstration projects that one can download from wolfram.com? It seems like all of ...
186 views

Efficient Data Entry / Manipulation with Many Datasets

I currently have a simple task of graphing many different datasets (26 here, with many different instances where I'll need to do, say, 26 different ones from the same template). I'm trying to ...
426 views

How do I create an ellipse bubble chart?

I have some data that I would like to plot as a bubble chart. The data is formatted as {{val1_mean,val1_sd,val2_mean,val2_sd},{val1_mean,......}}. What I would like to do is plot a bubble chart where ...
563 views

Arcs of rotation for angles

How can I draw trigonometric angles of any radian measure associated with the unit circle, complete with the x-axis and y-axis? How can I draw arcs of rotation inside positive or negative angles? Is ...
273 views

Export matrix to $\LaTeX$ with style

Is it possible to export a matrix to $\LaTeX$ with style? For example this code will create a matrix with equal spacing matrix and with background colors in some cell, is it possible to export that ...
730 views

Importing several huge files with headers & footers

having here several files in ASCII format http://ge.tt/91rv0Jf/v/0 I want to import, while removing headers and footers and then join the several lists. ...
197 views

How to rewrite this function to be faster: Find sub-matrixes of boolean board which imply a given boolean pattern

I have Boolean matrix A (called "board") and Boolean matrix B with smaller dimensions (called "pattern"). I am trying to find sub-matrixes C of A such that C has same dimensions as B, and ...
119 views

Defining an Implies operation that works for Boolean matrices

I have two Boolean matrices, that both have dimensions m x n. I want to create a function TableImplies, which would return True ...
215 views

Custom (Frame)Ticks fail when using Mathematica's script engine

I want to define my own ticks in a DateListPlot. It works quite well when I use the code in a Mathematica Notebook but breaks somehow when using it via ...
80 views

Edit AxesLabel from an existing plot

I have a really complex function that takes a few hours to plot as a function of a parameter. Few days later I realised that I named the axes wrong. Is there an easy way to edit the AxesLabels without ...
192 views

How to integrate ParametricNDSolve solution with respect to a parameter?

I have just upgraded to the new version of Mathematica because of its new built-in ParametricNDSolve function. I need to solve a first-order non-linear ordinary ...
286 views

Problem with WhenEvent

I am trying to add a time dependent fraction to a parameter in NDSolve, i.e. when 10 < t< 20, add ...
33 views

Plot derivative of integral with changing limits [duplicate]

My code is: Plot[D[Integrate[E^(t*(-x^2)),{x,t+2,t^2}],t],{t,-2,3}]. The errors/warnings are: ...