4
votes
6answers
255 views

Sorting Matrix elements

I have matrix in as shown, consisting of real numbers and 0. How can I sort it to become out as shown? ...
1
vote
1answer
128 views

How do I find the value of specific printing options?

I'd like to programmatically save (and then temporarily change and restore) specific printing options. I get as far as Options[Notebook, PrintingOptions] but ...
10
votes
3answers
335 views

Typeset unbalanced brackets

In LaTeX, you can typeset expressions containing unbalanced brackets, by balancing them with an invisible delimiter \left. or ...
4
votes
1answer
317 views

Can Mathematica check spelling during typing?

I can't see a way to get Mathematica to check my spelling as I type. Is this feature not supported? I've done everything I can think of with my options: Is there a setting I'm missing?
9
votes
5answers
621 views

Create filling between two trig functions

Working with trig functions, period, amplitude, etc. I found a worksheet at a calculus website, with some nice questions related to interpreting trig functions, at least, they provide some "fun" ...
7
votes
2answers
188 views

Why isn't Simplify doing more simplification of this expression?

When I try this Simplify[(1-a)*(1/(1+x*m))^(1-a)(1+m)^(1-a) + (1-a)*(x*m)^a*((x*m)/(1+x*m))^(1-a)*(1+m)^(1-a)] the output is $$\frac{(1-a) (1+m)^{1-a} ...
1
vote
0answers
243 views

Return Functions from parallel execution of module

I wrote a module which numerically solves an ODE using NDSolve. The result from this is e.g. either ...
7
votes
3answers
340 views

Operations on elements of ragged lists

Suppose I have a list of lists with different lengths, sorted from longest to shortest ...
0
votes
1answer
105 views

Defining functions from expressions of variable lengths

I have a list of symbols that I have defined using d = Table[Symbol["d" <> ToString[i]], {i, 1, n}] giving ...
5
votes
5answers
1k views

How to group certain symbolic expressions?

For example, I have the following expression : A( 2 x1 + B(y1 + y2) + 2 x2 ) How do I make the output look like this (grouping ...
10
votes
2answers
299 views

Dependent Manipulate sliders

I would like to use dependent sliders in Manipulate. First slider K0 should be independent and varied from ...
16
votes
1answer
444 views

Speeding up trigonometric integral

Context On a possible non trivial toric topology for the Universe (nothing less!). Problem I would like to carry out the following integral for $\ell=2,4\cdots 20$. $$\int _0^{\pi }\int _0^{2 \pi ...
1
vote
1answer
123 views

Working of Date[]

Date[] returns the current date of local system, Date[1] returns {2012, 11, 15, 17, 41, 0.3161629}, ...
1
vote
3answers
108 views

Timing display of Graphics (Front End timing)

I want to know how much wall-time it takes to display a Graphics For example this one: ...
5
votes
3answers
481 views

How to sum matrix elements based on finding the first (and second) non-zero elements of each row?

I have a matrix: I would like to sum all the first non-zero elements of each row so that I get a value of $$25.5317 + 8.85471 + 6.90018 + 32.9436 + ... $$ and so on and simply ignore zero rows. ...
15
votes
3answers
921 views

Monotone, periodic 1d-interpolation with continuous 1st order derivative

Lately, we had this thread about interpolation where J. M. linked two interpolation methods. The background for my question is that I estimated a parameter in polar coordinates with dependence on the ...
0
votes
0answers
35 views

Why isn't the matrix product computed? [duplicate]

Possible Duplicate: Why does MatrixForm affect calculations? I have the following input: Why is the matrix not computed, giving me a $2 \times 2$ matrix?
9
votes
2answers
800 views

Exporting data from Excel into Mathematica using clipboard

I know that it's possible to import Excel data into Mathematica using the Import command, as we can see in this post. But some times, I need just to do some fast ...
14
votes
2answers
828 views

Dealing with large files

I have a *.dat file in which the contents are basically one giant list: {1,2,3,4} {5,6,7,8} {9,10,11,12} and so on. I'd like to read in the first 500 members { ...
10
votes
2answers
365 views

Determining the default Method used in optimization and root-finding algorithms

Is it possible to extract the Method which is used in functions like NMinimize, FindRoot, ...
1
vote
1answer
243 views

How to Sort on row by row basis?

Say I have matrix how to sort on row by row basis to get:
3
votes
1answer
315 views

Plot maximum and minimum temperature of a day for range of time interval

How to display (in any graphic representation) the maximum and minimum temperatures for one city in one of these selected time periods over the 5-day period? The time periods are: Morning (06:00 to ...
5
votes
5answers
661 views

Prevent Part[] from trying to extract parts of symbolic expressions

If you have a list, e.g. {1, 2, 3} then you can extract the $k$th part using Part (...
4
votes
1answer
853 views

How to print coordinates above certain points

How do I place the x and y values of the points I have found (maxandmindistance) above the point in a plot? Here is my code so far: ...
2
votes
1answer
194 views

Difference between Map[f[#] + g[#] &, {a, b, c}] and Map[f[x]+g[x]&, {a, b, c}]

Map[f[#] + g[#] &, {a, b, c}] vs Map[f[x]+g[x]&, {a, b, c}] My question is: why is the output different? ...
11
votes
9answers
875 views

How to join each of the spheres? Or, how to make a 3D grid?

Graphics3D[{ {RGBColor[#], Sphere[#, 1/50]} & /@ Tuples[Range[0, 1, 1/5], 3] } ] It gives this: Now I want to get this one: How? As simple as ...
6
votes
3answers
172 views

Is there any way to collect only variables with a specific power?

Suppose I've got this: In[13]:= Expand[(a + b) (b + c) (c + a)] Out[13]= a^2 b + a b^2 + a^2 c + 2 a b c + b^2 c + a c^2 + b c^2 And I want to collect only ...
6
votes
1answer
319 views

Why is MapIndexed better than mapping over a range?

Background I'm working on an application in which I need to create and control two sets of locators. I know from reading the Mathematica documentation and certain posts on Mathematica.SE that this ...
1
vote
1answer
124 views

How can I use several data fields drawn from curated data at once?

How can I use "MinTemperature", "MaxTemperature", and "Temperature" properties of ...
2
votes
1answer
106 views

How do I stack a RectangleChart?

What I would like to do is represent the state of a machine over a period of time using a RectangleChart (or anything else that can do it) . The chart will need to be made up of equally sized blocks ...
1
vote
1answer
323 views

How to do conditional matrix division when elements are a combination of zero and real numbers?

I tried to divide two large matrices DLand PL of size 100,000 x 5 each and they look like this, DL= and PL= By using conditional function: ...
7
votes
2answers
305 views

Use of Cellular Automaton or Discrete Convolution to calculate Potts Energy of a 2D Matrix

In a project of Monte Carlo Modelling of Grain Growth (Link) one of the most costly subroutines is the calculation of the Potts-Energy of an Monte Carlo Grid cell by comparing the center cell value ...
2
votes
1answer
144 views

replacement rule to pull independent expression outside of Integrate

I'm trying to write a fairly general replacement rule that will pull expressions independent of the variable of integration outside of Integrate, since Simplify and ...
2
votes
1answer
735 views

How to find all roots and maxima and minima and graph them

I need to find all the roots of this function. I know it is simple to find by hand, however, I wish to learn how to do it so I can apply it later. The problem is that it only gives me one root. ...
4
votes
2answers
157 views

Function behaves differently inside a package than outside

I defined a function TestHead in a notebook as follows: TestHead[z___] := TrueQ[{z} == Cases[{z}, x_ /; Head[x] === avar]] to ...
28
votes
4answers
986 views

Filtering beat-to-beat heart rate data

From an experiment, I have a dataset of beat-to-beat heart rate data: a list of the time between each heart beat in [ms]. The data is measured using an infrared optic sensor at the finger tip. The ...
7
votes
1answer
381 views

Converting XMLElement objects to plain text

Short version: How can I convert an XMLElement that represents part of a HTML document to plain text? Long version: The more general problem is extracting ...
11
votes
5answers
437 views

An elegant way to plot a numeric function that returns a list, and have each element in a different color

I have a function that takes a numeric argument and returns a list of numbers. I want to plot each element of the list in a different color. If I use this command, ...
0
votes
2answers
136 views

Exporting lists with two extensions to files

Continuation of this question: How to export if I need to have two extensions instead of one. E.g., in the previous case one can generate lists labeled L[1], L[2],.....and so on using a loop. But if I ...
2
votes
3answers
353 views

How do I make data retrieved from Wolfram|Alpha persist in a notebook?

I want to store hourly temperature readings retrieved from Wolfram|Alpha in an array in my notebook. If this is not possible, then tell me how to preserve the retrieved data in my notebook, so when it ...
3
votes
0answers
112 views

Dealing with errors and resuming the code after one

How can I write my Mathematica code so that it resumes at a specific place if any Message is displayed during the execution of an expression? For example, in Visual ...
6
votes
4answers
284 views

Where can I take a pool of words from?

Dear Community members, I am thinking about an interactive machine to teach a school child to write difficult words correctly. As a first step I need a collection of words. I will select a pool of ...
9
votes
2answers
543 views

Extracting vertex coordinates from an automatically laid out graph

Given a Graph with an automatically computed layout (i.e. not explicitly given VertexCoordinates, but using a ...
16
votes
2answers
1k views

Generating convex polyhedron from face planes?

Suppose I have lists of normals and points for planes. There's a convex polyhedron whose faces lie on these planes and are bounded by plane intersections. What would be the easiest way to produce an ...
0
votes
1answer
171 views

How do I construct a “named character” programmatically?

Why am I getting the error Syntax::sntunc: Unicode longname in the string is unterminated. from the following? ...
2
votes
1answer
602 views
7
votes
1answer
480 views

Log-scale histogram bug

Not really a question, more a solution to what I call a bug in mathematica v8(.0.0.4). I already sent a bug report to Wolfram. Problem The documentation for the Histogram-function explains the ...
2
votes
2answers
347 views

Awkward output of TeXForm

When I try to format a number that has a big exponent with TeXForm the following happens: ...
11
votes
2answers
503 views

Fast Simulations with Compile

this post relates to another post that I didn't follow up propely. If I wanted to simulate a system of stochastic proesses like the following, and loop over this run many many times would writing the ...
9
votes
5answers
744 views

convert long string to integer list

at first, i would like to thank all the people here. i'm working with mathematica for half a year now and always found great advice and tricks. now, i came up with a problem i couldn't find a ...

15 30 50 per page