7
votes
1answer
430 views

Combining and aligning “chart” type graphics with regular plots

Is there an easy (recommended) way to align regular plots (e.g. ListPlot or Plot) with chart type graphics (...
7
votes
1answer
476 views

How to create a multi-selectable setterbar with colored buttons

Background: consider the following code-snippet. ...
7
votes
3answers
333 views

Why can't D[] be used in place here? [duplicate]

Possible Duplicate: General::ivar is not a valid variable when plotting - what actually causes this and how to avoid it? Beginner question: Why can't I use ...
7
votes
2answers
378 views

Revert FullForm-ed text to prettyprinted

Sometimes strings in a notebook/package file end up garbled due to some unknown/unintentional conversion of the expression/cell/notebook. I could not find a way to revert such unreadable text to its ...
6
votes
1answer
102 views

Mathematica with MongoDB database

I try connect mathematica with my database NOSQL mongoDB but I have problem with create collection. I have Mathematica 10.2 and I download driver .net version 2.2 from this website a link! I unpacking ...
6
votes
4answers
485 views

Random sampling of multiple integers with constant sum

I want to build a model of 40 geological layers, assuming each layer has equal chance to be one of the four types of rocks and the four types of rocks have equal chance to appear in any layer. The ...
6
votes
2answers
206 views

Mathematica-exported PDFs placed in Illustrator documents keep disappearing

This question is regarding interoperability between Adobe Illustrator and Mathematica. Illustrator has a File → Place... function which can insert complete figures inside Illustrator documents. ...
6
votes
1answer
150 views
6
votes
1answer
363 views

Removing gutter shadows from scanned pages

I am new to image processing, and I was hoping someone might set me in the right direction. I am trying to create a simple toolkit for personal use for digitizing scanned book images into a database. ...
6
votes
3answers
261 views

How can I stop Mathematica from re-arranging formulae in TraditionalForm?

Let's say I have a sample formula, for example (Abs[x]/(-(2 - \[Kappa]) - 5))/(Binomial[a, b]/4) or something like that. I can of course typeset it to a limited ...
6
votes
4answers
325 views

What is shorthand way of Reap list that may be empty because of zero Sow

Sometimes because of conditionals, you cannot guarantee that Sow will be called at least once. Reap[Sow[1]][[2,1]] results in ...
6
votes
2answers
239 views

Simplify 2D polyhedral Regions like Interval

I don't think there's a built in "RegionSimplify" for polyhedral Regions and derived akin to how Interval automatically simplifies its argument expression: ...
6
votes
3answers
208 views

Weird output of DistributionChart

I have a larger data set and want to display it using DistributionChart. ...
6
votes
2answers
149 views

Choppy curves with Manipulate [duplicate]

While manipulating the slider in Manipulate[], I experience choppy curves. These do however render correctly after letting go of the slider. The same phenomenon occurs when pressing the + or - button ...
6
votes
2answers
153 views

Return value of Reap when using tags

I've noticed a behaviour of Reap that I don't quite understand yet. Suppose I want to Sow several values during a computation. ...
6
votes
2answers
153 views

Fractions formatting in Column / Grid

Fractions are squished in GridBox: ...
6
votes
1answer
271 views

How to deal with too much recursion

I have put together a very simple climate model based around four equations which define the state at time t based on time t-1, ...
6
votes
3answers
167 views

How to simplify my expression to the style of “a+b*I”?

How to simplify my expression to the style of "a+b*I"? Expand[(E^(I θ) (-1 + E^(I n θ)))/(-1 + E^(I θ))] ...
6
votes
6answers
351 views

Sort a list of coordinates by frequency from first component of each coordinate

The situation is that I have a List like this: ...
6
votes
2answers
370 views

How to add a graphics frame to an image without resampling

Using Inset to place an image inside a Graphics expression with Frame -> True provides a ...
6
votes
2answers
240 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 lists: List1 = {0, 1, 0.6, 0.5, 1.2, 0.4}; List2 = {"a", "b", "c", "d", "e", "f"}; How can I use Pick to ...
6
votes
1answer
277 views

Generate regularly spaced points from the surface of simplexes

I need to generate regularly spaced samples (points) from the surface of unit simplexes with 2 or greater vertices or end points. I can generate random samples pretty straightforwardly: ...
6
votes
1answer
361 views

String pattern search and replacement — it works, but produces error messages only the first time it is called

I defined a function in Mathematica to process a pre-generated string. More specifically, I'd like to process some parts of C codes generated from MMA. Basically what my function does is to expand the ...
6
votes
2answers
408 views

Why do I get empty graph when adding 'Abs' function?

Can someone be so nice to provide some help for this particular situation? I try to plot a graph of a derivative which contains modulus. Without it the graph is drawn correctly: But when I wrap the ...
6
votes
2answers
414 views

How can I find if the number of subsets for a list is very large?

I'm trying to find the following; Subsets[Range[2, 2300], {4}] but my computer gave the following error: ...
6
votes
1answer
578 views

How to show error messages in current notebook?

I would like Mathematica to print error messages in current notebook together with output. This is default option in Mathematica, but recently I turned it off somehow. Now, I am getting output in ...
6
votes
2answers
436 views

Variant of the cutting-stock problem in Mathematica

I'm pretty new to Mathematica and am trying to learn to solve problems in a functional way. The problem I was solving was to list the ways in which I could sum elements from a list (with repetitions), ...
6
votes
2answers
354 views

Is it possible to induce Mathematica to chop off parts of Graphics objects that exist outside of a Frame?

I am running Mathematica 7. In a Graphics environment I am setting Frame -> True (and using ...
6
votes
1answer
287 views

Dialog inside Dynamic Module [duplicate]

The following doesn't appear to work: DynamicModule[{}, Button["Press Me", ChoiceDialog["OK or Cancel?"]]] When I press the button labelled "Press Me", a dialog ...
6
votes
1answer
707 views

Evaluate while external command is being run [duplicate]

Possible Duplicate: Computing Many Slow I/O Operations I'm launching an external command with the Mathematica front end that takes two arguments: ...
6
votes
6answers
2k views

How do I fill in a circle made by ParametricPlot with one solid color?

I have a very simple question but I am new with Mathematica. I made a circle on a parametric plot and I made the line black. I want to make the inside of the circle on the parametric plot red. So the ...
6
votes
3answers
287 views

Scope within Context

To define some package-wide functions/variables, what approach is recommended? I tried to use contexts with the Begin function, but this failed: ...
6
votes
1answer
356 views

ArrayPlot with cells labeled by corresponding values

I would like to have ArrayPlot[] also present the value of each cell in it, similar to the LabelingFunction that is available in ...
6
votes
2answers
504 views

Monochrome PNG (and GIF) Export

Is there a way to Export expressions to a monochrome PNG? I have tried the ColorQuantize function which is mentioned in ...
6
votes
2answers
516 views

Passing unquoted strings (poor man's enumeration)

I would like to be able to pass an unquoted string as a parameter to a Mathematica function [that I am writing] and have it show up without evaluation if the string happens to be defined. Thus I would ...
6
votes
1answer
160 views

How to let output and message be print to two separate external files?

How to let output and message be print to two separate external files? Also, I'd like the content print out to have similar look as when it's print inside the notebook, i.e. it should be in ...
6
votes
1answer
1k views

How to make a dynamic stopwatch?

For some experiments I need some basic timer function. I tried various methods, and neither of them are fully satisfactory. What I need is a button, that starts/stops a timer, resets timer with each ...
6
votes
1answer
497 views

What does MaxStepFraction do?

I find that with NDSolve[...] while solving a partial differential equation, changing the MaxStepFraction from ...
5
votes
2answers
56 views

How to define a complicated function inside the body of Compile?

I want to compile a function in a way to keep its memory footprint down. In the example below, I am trying to compile a function f that makes three calls to ...
5
votes
5answers
145 views

Choosing sets from Subset[list]

Say I have a set, S, and I take Subsets[S] (the power set of S). For example: S={a,b,c} Subsets[S]={{}, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}} How can ...
5
votes
1answer
80 views

Same name for functions in package and Global context

I am using a package that was written for Mathematica 3 while I am now working on Mathematica 8. I have issues with 2 functions in particular, Order and GraphComplement. They are a part of this ...
5
votes
1answer
93 views

Naming conflicts with Dummy variables in several packages conflicts

I'm using several packages in a notebook. In each packages there is functions defined with dummy variables. When I load the several packages in my session, i've got a warning message: ...
5
votes
3answers
236 views

adjust the alignment of different legends

I used Show to combine a ListPlot and Plot, and each plot has its own legend. The code is as ...
5
votes
1answer
130 views

Is it possible to change the precision in Compile?

I'm using Compile to do some numerical calculation and I need high Precision. I was wondering if it is possible to change the ...
5
votes
4answers
201 views

ArrayPlot with variable width bars

I've been using a DateList plot to visualise property information but I don't think it's the best way display my data. My data is formatted as {time (hours), property} where property is an integer ...
5
votes
1answer
241 views

How to plot the result of this singular integral?

Please I open a new post here after this one : http://mathematica.stackexchange.com/a/59203/10158 Now I want to plot the function $f(a,b)$ as a function of $b$ for different values of $a$ : $a=0.5$ , ...
5
votes
1answer
147 views

How to make a case insensitive sorted list and rename the file names of a given folder?

Suppose I had about 500 .JPG and .jpg files in my folder "c:\images\". How to ask ...
5
votes
1answer
570 views

Apply color function to matrix plot

I want to apply the following color rules to a large table of numbers. I have extracted a part of the table to use as an example. I would like to assign 5 different colors to 5 different ranges of ...
5
votes
2answers
522 views

Exporting strings without the quotes

I'm trying to export the following string "sep = ," to a CSV-file, as to be able to define the separation symbol. However, when using the following command: ...
5
votes
1answer
237 views

Isn't it possible to Pack a SparseArray?

I have the following matrix Va: ...

15 30 50 per page