6
votes
1answer
155 views
6
votes
1answer
188 views

How to check the option value?

Given that I have a function func as follow: To check the value of options, I using the step-by-step method If[] ...
6
votes
1answer
371 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
3answers
458 views

Finding all sublists or substrings of a given list/string

Given a list or string, how do I get a list of all (contiguous) sublists/substrings? The order is not important. Example for lists: ...
6
votes
4answers
329 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
240 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
209 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
154 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
1answer
217 views

Keeping vertexcoordinates after adding a new vertex

I want to add a new vertex to a graph, with fixed VertexCoordinates but when I use VertexAdd, the new graph does not have the VertexCoordinates of the previous one. ...
6
votes
2answers
371 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
583 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
355 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
288 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
708 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
357 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
507 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
498 views

What does MaxStepFraction do?

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

Operate on several lists to create one list

How do you put corresponding values from different lists together according to some operation? E.g. I have three lists giving the velocity in the x, y and z direction respectively. I'd like create ...
5
votes
2answers
69 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
146 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
81 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
0answers
102 views

More frugal display of usage messages in auto-completion popup – possible? [duplicate]

Update: I think the more general question I should have asked is: How should I write usage messages to work well with auto-completion? Is there documentation on how to prepare a package for convenient ...
5
votes
1answer
94 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
239 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
202 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
243 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
574 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
240 views

Isn't it possible to Pack a SparseArray?

I have the following matrix Va: ...
5
votes
2answers
191 views

BezierCurve in EdgeShapeFunction fails when used on multiedges graph

I would like to create a network graph with curved edges. To do this, I wrote this function: ...
5
votes
2answers
528 views

10bits per rgb / 1024 shades of gray?

Can we display 10 bits per rgb in Mathematica? I'm using a quadro card and 30 bit monitor and can get a smooth gradient using Psychtoolbox in matlab. The following Mathematica should produce a bar ...

15 30 50 per page