2
votes
2answers
255 views

Index-based Array splitting

I have an array of arbitrary elements, say strings: testArray = {"String A", "String B", "String C", "String D", "String E"}; How can I split this into two ...
1
vote
0answers
59 views

Gray background in export pdf

I am trying to output a simple plot with a legend and the output keeps coming out with a gray background. A simple example is the following: ...
8
votes
2answers
124 views

Half-delayed evaluation

In a certain wider context, I need to make some delayed definitions, such as x := a + b + c, but within these definitions I want ...
3
votes
1answer
121 views

Social Network Analysis - Get the End Points of an Edge

I want to get the end points of an Edge of a Graph. For example see the following source, ...
2
votes
2answers
146 views

Defining a function that returns “undefined” if its value is outside of a specific range

I want to define a function f(x) which: $f(x)=x^3 +10x+ 5$ if $f(x) >0$ $f(x)=Undefined$ if $f(x) <0$ I have a idea: ...
1
vote
1answer
100 views

How to replace a list with the result list after each iteration [closed]

I have some initial values such as L1 list: L1={10,20,30,40,50}; I want to use the L1 ...
1
vote
2answers
73 views
0
votes
1answer
85 views

How to prepare (copy/paste) data from Matlab?

What is the best way to get data from Matlab to Mathematica? For a new project I want to copy/paste a table (or part of it) of datas from Matlab to Mathematica. Copyed from Matlab it is: ...
0
votes
1answer
74 views

How to constrain the range of a plot o f a function to satisfy an inequality?

Given the function f[x_] := x^2, how can I plot f[x] over the region where f[x] >= 10 and ...
3
votes
1answer
86 views

Polar Differential Equation

I have a polar differential equation (this is the reduced variant) as: $$r' = 0, \theta' = 1$$ I figured out (from previous answers) that I can nicely convert this to Cartesian and use StreamPlot ...
0
votes
1answer
132 views

curve on the surface [closed]

I have a bezier polygon aa=Table[{i^2.5, 2*Sqrt[i]}, {i, 1, 5}],is anyone can give me a example in Mathematica code that how to create another iso parametric curve on this bezier surface?Display the ...
1
vote
0answers
32 views

Import: maximum size FITS file

I am trying to Import a big (~800 Mb) FITS file in Mathematica, but I am having problems. Is there a a workaround to this memory problem that does not involve chopping the FITS file in smaller pieces? ...
4
votes
2answers
202 views
1
vote
0answers
69 views

Fluid mechanics problem concerning flow over a wedge

Below is the code I am using to generate a velocity profile and temperature profile for flow over a wedge. ...
0
votes
0answers
30 views

How to select a set of cells to cut and paste into another notebook

I'd like to cut and paste from one Demonstration notebook to another. These notebooks have a few sections where the content is separated into disjoint cells (examples: Details, Related Links, Search ...
0
votes
1answer
35 views

Scaling the time axis of an interpolated function (as in a solution from NDSolve)

I'm wondering how I can change the units of the x (time) axis when plotting a solution from NDSolve. I have obtained three solutions to a system of differential equations, all of which exist over the ...
0
votes
2answers
50 views

How to obtain all the partitions in a set $A$ such that the union of these partitions equals $A$?

I'm trying to make a visual proof on the irrationality of $\sqrt{2}$. At the moment, I've created a figure to show that $b^2$ elements always constitute a square: And I want to show that it's not ...
0
votes
1answer
36 views

Bar Chart: How to adjust the font size for the bar labels as the chart size is manipulated

I have data that represents the binding energy of oxygen on different surfaces. Each bar is a different transition metal, and the length of the bar is the binding energy of oxygen. How do I make the ...
1
vote
2answers
48 views

Computing symbolic norm of a vector

Consider the code: n1 := Cos[α] Sin[β] n2 := Sin[α] Sin[β] n3 := Cos[β] n := {n1, n2, n3} Norm[n] Why the result is ...
0
votes
1answer
103 views

Advice on Gather

Is there a better way to write this gather? I have a list of particles, "particlelist", and a list of particle coordinates, "coordlist" and I want to put all the particles into a 3-dimensional ng x ...
2
votes
1answer
52 views

CDF embedded in web page and Windows desktop magnification

I am running Windows 8.1 on a ThinkPad T540P with a 3K screen, which is equivalent to Apple Retina screens. I have configured Windows to increase the magnification of the desktop to make fonts ...
0
votes
1answer
26 views

Union::normal: Nonatomic expression expected when using Uncompress

I saved a expresion to a file like this Export["file.dat",Compress@myExpression]; Then (i don't know why) when I import the file i get the compressed expresion ...
0
votes
0answers
27 views

app keeps minimizing when switching in windows 8

so I run mathematica on my surface pro with windows 8 pro, when I opened a notebook in it and switched to my browser and some other apps it's sometimes impossible to go back to my notebook, it ...
7
votes
3answers
400 views

How to fix this memory leak

I am using halirutan's code in this thread to unflatten a list. It works very well but the problem is that the Module's local function f is not deleted when the ...
4
votes
1answer
67 views

How to set the position of the palette when use CreatePalette[]

When using CreatePalette[], the palette created always shows up on the upper left corner. Is there a way to make it show up at the center of the screen, just like ...
0
votes
3answers
50 views

Printing the base 'b' value of an integer as a string (without the subscript base indication)

Is there a simple one-liner to convert a given base 10 integer to a string representation of this integer in some desired base 'b'? Is there a way to do this avoiding the subscript indicating the ...
0
votes
0answers
66 views

Caching RecursionLimit::reclim error

I am learning how to catch exceptions, RecursionLimit::reclim in particular. To see how it works, I came up with the following example: ...
4
votes
1answer
138 views

Creating a dynamic plot directly from the recurrence relation

I have the following recurrence relation that has no general solution: $$x(t+1) = \frac{x^2 + x(1-x)(1-sh)}{x^2 + 2x(1-x)(1-sh) + (1-x)^2(1-s)}$$ In Mathematica language it gives: ...
2
votes
1answer
51 views

Importing a Base64 encoded string

everyone, I'm handling some paragraphs enconded with Base64 from CSV file format. The problem is that Mathematica can't decode it. It seems Mathematica Encode/Decode their own Base64. I'm thinking ...
4
votes
3answers
104 views

Using If statements internal to Table [duplicate]

Is there a way to use If statements with Table? To give a kind of ridiculous example that captures to spirit of what I'm trying ...
1
vote
2answers
286 views

Research positions of lists of varying size

I'm new to the site and I am French, so I ask your indulgence for my future mistakes in English. I would like to optimise the following code : ...
0
votes
1answer
57 views

Why do Permute and PermutationReplace not invert one another? [closed]

Why do Permute and PermutationReplace not invert one another, as stated in the documentation? If we have an identity ...
4
votes
4answers
244 views

Distance between two line segments in 3-space

I need to compute the distance between two line segments in a project. After googling, I found this algorithm and used it to implement a Mathematica version: ...
-7
votes
1answer
157 views

Plot The Cornu Parametric Spiral

How to plot the Cornu parametric Spiral in 3D With Mathematica. The 2D is quite easy. Thx. For more details you need to be familiar with the Cornu statement. $$\begin{cases} ...
1
vote
1answer
115 views

How to reverse the direction of the y axes on Graphics

Question related to this one, except I need the same for the Graphics. Lets say I have the following drawings: ...
0
votes
1answer
46 views

Why won't Manipulate work with symbols generated by Symbol?

Suppose I am provided with two data lists. (Assume for the moment that they are lists of integers.) I would like a function that generates bar charts that I can manipulate. Here is what I have: ...
2
votes
0answers
46 views

Why does setting $Assumptions make my Fourier transforms slow?

Consider these Fourier transforms ...
0
votes
0answers
82 views

How do I find where the maximum is?

I have a function given by: ...
3
votes
3answers
196 views

Finding a better way to define a matrix

I first defined a 171x171 matrix containing only zeros and then replaced 18 specific rows with nonzero entries. The other $153$ rows will be average of $2$ of the existing $18$ rows. Rows $2$ ...
1
vote
2answers
78 views

Given an equation with one parameter, how do I use NSolve to solve it for many values of the parameter?

I was wondering if there was a way to use the Mathematica NSolve command to solve an equation that has a parameter with various values. An example of which is: ...
0
votes
1answer
43 views

Replacing powers of $n$-th partial sums in the output of a function with $S[i]$ for $i = 1,\ldots,n$

I've written some simple code that, for various $N \geq 1$ and $k = 1,\ldots,N+1$ computes the $n$-th derivative of $\log S_N$ where $S_N(z) = \sum_{k=0}^N \frac{1}{k!}z^k$ as follows: ...
1
vote
1answer
62 views

Efficient calculation of diagonal matrix elements

I have a matrix $V$ of size $M$ in which each row $i$ is a vector $v_i$. Now I have another matrix $H$ and I would like to calculate as efficiently as possible the list of values $v_i^\dagger\cdot ...
2
votes
1answer
92 views

Defining conditional Notation rules

I am trying to define a notation rule so that for selected symbols subsripts will be equivalent to function parameters. My understanding of the docs suggests the following ...
0
votes
1answer
69 views
7
votes
1answer
179 views

Fitting a numerical integral via NonLinearModelFit to magnetic data

I'm new to Mathematica and I'm currently trying to fit $$m_T (H,T) = N_T \int\limits_0^{\infty} \frac{x k_\text{B} T}{\mu_0 H} \mathcal{L}(x) \text{pdf}(D_\text{mag}) \text{d}D_\text{mag}$$ with ...
2
votes
0answers
100 views

Improve the clarity of a graphic [closed]

I want to use Mathematica to plot two 3D plots which delimit different regions of the space, and I want to show the differences between the region they delimit. These regions are: $z \geq cte /(4 x + ...
2
votes
1answer
98 views

How to handle a sparse array of lists

I have data in the form of a sparse array of lists. For example: ...
0
votes
1answer
34 views

Storing solution to x and y [duplicate]

If I do sol=Solve[{2x+2==y,3x+9==y},{x,y}] then Mathematica will tell me {{x -> -7, y -> -12}} But I would like to ...
1
vote
0answers
49 views

Finding undetermined coefficients with boundary conditions

I have 2 equations which are; To[x_] := c1 E^(-a1 x)/2 + c2 E^(a1 x)/2 + a2 Tu[x_] := c3 E^(-a3 x)/2 + c4 E^(a3 x)/2 Tu equals almost zero ...
2
votes
1answer
42 views

Problem with parentheses and ScriptBaselineShifts

Style[ DisplayForm@RowBox[{"(", SubsuperscriptBox[2, 6, 7], ")"}], 18, Bold, ScriptSizeMultipliers -> 1, ScriptBaselineShifts -> {1, 3}] or for ...

15 30 50 per page