6
votes
1answer
363 views

Using MathKernel without echoing a window

I use M9 under windows 7 on a command prompt as: MathKernel -noprompt -script file.m On execution, there is a like a kernel window opened and then closed immediately. How can I avoid this window and ...
0
votes
0answers
139 views

How to add labels to a graph [duplicate]

This should be an easy question but since few examples are given for ShowLegend and I am a new user, I got stuck after many attempts. I plot three graphs which are ...
0
votes
1answer
912 views

How to neglect higher power terms in a polynomial expression

I have a polynomial expression of order n (say n=20). F(x)=1+x+x^2+x^3++...x^20. I want to approximate the polynomial for order 3 only. So I need to make the ...
1
vote
1answer
157 views

Manipulate doesn't work for plotting a region where a matrix is positive semi-definite

I'm facing the following problem and would very much like you help. Thanks is advance! I have defined the following 4x4 matrix: \begin{equation} S=\left( \begin{array}{cccc} ...
-5
votes
1answer
393 views

random number visualization without generator (Spectral Test)

Does anyone have codes for using only numbers to make this kind of random-number visualization and not requiring a number generator? ...
6
votes
2answers
378 views

Pruning elements in an array based on the existence of similar elements in adjacent arrays

Imagine I have a series of particles floating around in $\mathrm{R}^3$, where, at any given time, particles can pop into and out of existence. Here, for some number of time points, $(t_1, \dots, ...
5
votes
3answers
478 views

ContourPlot and Colorfunction

I have the following code: ...
1
vote
0answers
75 views

ReadList with type Expression unable to read scientific notation? [duplicate]

I have a file that defines an array of numbers like this: freq["AQs"] = 8.846947803007962E-4 ... I am reading the file with ...
0
votes
1answer
113 views

Conditioning on group of functions

I have two sets of functions which I want to implement them in a single function with an option indicating which set of functions should be used. Suppose that I have two lists like:(updated example) ...
10
votes
3answers
458 views

How to make Excel-like data bars?

I would like to make a grid where each cell background is partially filled according to the numerical value being represented (on a scale from 0 to 1). Similar functionality to the one requested in ...
6
votes
1answer
2k views

Mutual Information involving two matrix states

I basically retrieved the following technique of evaluating the mutual information involving two matrices from this site at http://bmia.bmt.tue.nl/People/BRomeny/Courses/8C080/default.htm The ...
6
votes
5answers
221 views

Lowering the degree of an polynomial with an assumption that the polynomial has a factor x^2+ax+b

Let's assume $ x^{10}+x^5+1 $ has a factor $x^2+ax+b$ Then, If $x^2=-ax-b$, $ x^{10}+x^5+1 =0$. If we successively apply $x^2=-ax-b$ to $ x^{10}+x^5+1 $, we can make $ x^{10}+x^5+1 $ to degree 1, ...
9
votes
1answer
813 views

FourierTransform and Partial Derivatives?

I have a function of three variables $f(x,y,z)$, and it obeys a linear partial differential equation. I'm checking my by-hand calculations with Mathematica. I want to convert the PDE into the ...
3
votes
1answer
731 views

Simplifying an ArcTan expression

The expression $\tan ^{-1}\left(\frac{\sqrt{L^2 \sin ^2(\theta )}}{\sqrt{L^2 \cos ^2(\theta )}}\right)$ can be simplified to $\theta$. After some attempts I got the following to do the job. ...
1
vote
3answers
783 views

Phase portraits and StreamPlot

I typed StreamPlot[{y, x-x^3-0.3y+0.5Cos[1.25t]}, {x, -2.5, 2.5}, {y, -2.5, 2.5}] but all I got was a blank plot. What did I do wrong and can I fix it?
26
votes
6answers
584 views

Constructing symbol definitions for With

I would like to be able to define two arrays, one containing symbol names and one containing the values of those symbols, for use in constructs such as With. For ...
8
votes
4answers
472 views

Gather list elements by index

The following list has some elements that are labeled. For example {1, 2} -> 1, {-1, 3} -> 3, etc: ...
1
vote
1answer
391 views

How to tell Mathematica not to simplify an expression

While there is this question with a very similar title, it does not answer my question, which is: I have part of an input, in my case Re[Exp[I*x]] which ...
3
votes
2answers
290 views

two histograms ratio

I have two histograms and using listplot to draw both. Now, I want to draw a second plot, below the first, with the ratio of each bin. Does anyone know how to do this? Many thanks. This is the code ...
15
votes
3answers
1k views

How to get rid of the perspective effect in a 3D graphics

I have plotted a figure of MoS2 crytal structure. But the actual output looks like the spheres are not in the correct position due to the perspective effect. I obtained the correct position figure ...
-1
votes
1answer
105 views

How can I format DisplayFormula Cell into TraditionalForm when export as HTML

This example is in DisplayFormula cell. ...
4
votes
1answer
187 views

Modified definition of Sin does not work in Plot

I don't know if this issue has been discussed before, if anyone know any related post, please let me know, thank you :) Unprotect the function ...
5
votes
2answers
209 views

How can I use Pick[] to select items in one list when a value in a corresponding list is $\leq$ some value?

Imagine I have two list: List1 = {0, 1, 0.6, 0.5, 1.2, 0.4}; List2 = {"a","b","c","d","e","f"}; How can I use Pick to return a third list consisting of items in ...
2
votes
0answers
47 views

How can I account for assumed X and Y errors when using findfit? [duplicate]

I'm using very noisy biological data, and I need to assume, when doing linear regression, that there are errors in both X and Y. ...
1
vote
1answer
106 views

Eliminate some temporaries from a set of equations

I have a long set of equations, mostly obtained by introducing physics related quantities which stand for some kind of temporary variables: ...
5
votes
3answers
319 views

Switching among view points in a Manipulate expression

Edit: Some additional viewpoints were included to make it easier to test. Here's code for an alternative function, the graph of which is a bit less symmetric. Feel free to use either code set: ...
0
votes
2answers
148 views

Create a Matrix out of two matrices

I have two matrices A = {{a1,a2},{b1,b2}} and B = {{x1,x2},{y1,y2}}. I would like to create out of these matrices a new matrix ...
1
vote
1answer
239 views

Using Collect to gather explicitly imaginary terms

Collect[Expand[(x + I y)^6], I] yields x^6 + 6 I x^5 y - 15 x^4 y^2 - 20 I x^3 y^3 + 15 x^2 y^4 + 6 I x y^5 - y^6 How can I ...
3
votes
1answer
189 views

MathLink and writing *.tm files

My goal is to use MathLink to access the functions in sofa (Standards of Fundamental Astronomy) So far I have had mixed success. I have very little C programing experience so I am hoping to get ...
0
votes
2answers
93 views

Generating equally distributed voxel points based on a given point

I have a list of seed points that each of them indicates the bottom-left value of a voxel. In order to improve the accuracy of my function, I need to equally sample my points and apply my functions ...
3
votes
0answers
95 views

Finding the argument set for internal functions in Mathematica v9.0

I've recently run into a problem with importing TIF stacks in Mathematica: Slow import of multigigabyte TIF image stacks On the advice of Simon Woods and others, I've been looking into the behavior ...
7
votes
1answer
198 views

Symbolic tensor simplifications and the identity matrix

How can I get Mathematica to simplify the following expressions, with $Assumptions including Element[n,Integers], n > 0, and ...
5
votes
2answers
1k views

Place plot markers in front of error bars with ErrorListPlot

I'm making an ErrorListPlot where the error bars are a different color then the markers and it works, however, the error bars are drawn in front of the markers and ...
1
vote
0answers
237 views

Making simultaneous equation solving more efficient

I am trying to solve a system of several simultaneous equations that have been generated by a series of modules and functions, using this module: ...
0
votes
0answers
34 views

Applying Some Kind of Timing Function to AutoRunSequence [duplicate]

Ok, so I'm exporting a video to MOV format that is coming from a manipulate function (I'm demonstrating CLT to a class that doesn't have calculus as a pre-req, if anyone is curious). Anyhow, I'm ...
0
votes
0answers
46 views

List elements and iterator name collision [duplicate]

Let there be two lists, exp = {{i, i}, {j, j}}; exp2 = {{r, r}, {o, o}}; and there are two Table commands to access them. Then, ...
1
vote
1answer
62 views

Print all cells independently at once

Is there any way to print out to pdf file, in sequence, all cells independently? I have literally hundreds of cells that need to be printed in that way. Selecting each cell and "Print Selections" ...
0
votes
2answers
240 views

Using Button to display dynamic graphics

I have a DynamicModule with several graphic elements. I would like to create a button which would change a parameter and re-run the entire module. Say that we have ...
8
votes
1answer
290 views

How to compile Heike's winding number function?

Heike gave the following function for winding number: ...
1
vote
2answers
199 views

Embedding text on an opaque plane in 3D [duplicate]

A simplified specification of what I am trying to accomplish would be to construct a cube each face with a different color and each face having a text label that can be seen only when viewing from the ...
0
votes
1answer
387 views

Simplify equations using list of rules

I have a set of equations that I want to simplify using a list of rules: ...
2
votes
1answer
269 views

How to obtain a Symplectic 4×4 matrix?

I have a problem in obtaining a $2n \times 2n$ Symplectic matrix $T$, with $n=2$. I couldn't find a direct command in Mathematica to achieve this. Conditions: ...
10
votes
6answers
349 views

Using MapIndexed only at certain elements of a list

MapIndexed is a very handy built-in function. Suppose that I have the following list, called list: ...
10
votes
4answers
475 views

Autocomplete InputField

Is there a way to define a InputField that displays a list of options as you type? More specifically I'm looking for an ...
0
votes
1answer
158 views

How can a package use a variable of a notebook?

I have defined a function g in a package. It is: g[x_]:=x/.t->3 Now I work in notebook with the command: ...
9
votes
5answers
511 views

Span a function across several consecutive elements in a list

Suppose that I have a list called list. I would like to span an arbitrary function f across specified consecutive elements in ...
1
vote
4answers
453 views

Recurrence relation in a table

I am trying to generate a list of x-values for a function using a module, where my x-value must increase by 'a' if the term ...
-2
votes
1answer
332 views

Help in NIntegration Methods - Takes too long, why?

I have this code. It is a triple integral, and using the automatic method gives me a wrong answer for $T=0.1$ (the correct answer is $5.44$, while I got $3.73$ ). I've tried to change the integral ...
16
votes
1answer
994 views

Slow import of multigigabyte TIF image stacks

Update 6: After contacting Wolfram Technical Support, I was advised that the frame-to-frame import timing variability can be eliminated by reading in the frame stack from frame to frame with the ...
5
votes
2answers
216 views

Extract substring by repeated StringPattern

This code failed, but may exemplify my intention. StringCases["aA1bbbbbbbbbbaA2baA3b...aA4b",Repeated[Shortest["a"~~xx__~~"b"],{2,100}]] I want to get the ...

15 30 50 per page