For questions specific to version 7.0.x of Wolfram Mathematica, or not applicable to versions 6 or earlier.
Questions tagged [mathematica-7]
13 questions
9
votes
2 answers
Concatenate two integers in Mathematica 7
What is the most efficient way to concatenate two positive integers in Mathematica 7?
cc[123, 4567] >> 1234567
What about more than two?
cc[123, 4, 567, 89] >> 123456789

Mr.Wizard
- 24,179
- 5
- 44
- 125
7
votes
3 answers
A "MapList" function
In Mathematica there are a number of functions that return not only the final result or a single match, but all results. Such functions are named *List. Exhibit:
FoldList
NestList
ReplaceList
ComposeList
Something that I am missing is a MapList…

Mr.Wizard
- 24,179
- 5
- 44
- 125
7
votes
4 answers
Is there a faster way to find both Min and Max values?
Often I have written: {Min@#, Max@#} &
Yet this seems inefficient, as the expression must be scanned twice, once to find the minimum value, and once to find the maximum value. Is there a faster way to do this? The expression is often a tensor or…

Mr.Wizard
- 24,179
- 5
- 44
- 125
6
votes
1 answer
Mathematica 7 showing answer step by step
I would like to know the steps Mathematica applies to obtain a result.
I have
Limit[n^Log[2, n]/1.001^n, n -> \[Infinity]]
and Mathematica shows 0 but I want to know how it got that result.

Bla bla
- 111
- 2
- 8
6
votes
2 answers
Context unique to each group at a specified level
Recent versions of Mathematica provide the option of having a unique $Context for each cell group, via:
Evaluation > Notebook's Default Context > Unique to Each Cell Group
This is an appealing concept, but I find it unusable, as my code spans…

Mr.Wizard
- 24,179
- 5
- 44
- 125
5
votes
2 answers
Weird behaviour with GroebnerBasis in v7
I came across some weird behaviour when using GroebnerBasis. In m1 below, I used a Greek letter as my variable and in m2, I used a Latin letter. Both of them have no rules associated with them. Why do I get vastly different answers depending on what…
anon
4
votes
2 answers
Weird behavior of InterpolationOrder option of Interpolation
When trying to recreate an InterpolationFunction produced by NDSolve I faced very strange problem with InterpolationOrder option of Interpolation. Consider the following InterpolationFunction (an example function from the Documentation):
ifun =…

Alexey Popkov
- 9,355
- 4
- 42
- 93
3
votes
1 answer
Fastest way to check if a list contains zero
While preparing an answer to Secret Santa - Generating 'valid' permutations I came across the need to check if a list contains zero. I am wondering what the fastest way to do this in Mathematica 7 is, with emphasis on a short list of non-negative…

Mr.Wizard
- 24,179
- 5
- 44
- 125
2
votes
2 answers
Why does this Mathematica 7 Do loop work sequentially, but generates errors in parallel (using ParallelDo)?
I am running Mathematica 7, and I am trying to run a simple Do loop in parallel, using ParallelDo. The following standard, sequential code works fine:
len = 10;
A = Table[0, {len}];
Do[
A[[i]] = i*10;
, {i, 1, len}]
However, if I use…

Andrew
- 1,499
- 9
- 25
- 37
1
vote
1 answer
ColorFunction and Blend with respect to ListDensityPlot in Mathematica
I am trying to plot a series of data corresponding to (x,y) positions using ListDensityPlot in Mathematica 7. mydata is a list of data triplets {x,y,f}, where f is a real number between -4.5 and +4.5 (inclusive).
I would like ListDensityPlot to…

Andrew
- 1,499
- 9
- 25
- 37
1
vote
2 answers
Printing a decimal in non-scientific form in Mathematica
I would like to print the number represented by 3*10^-9 in non-scientific form: 0.000000003. How can I do this? NumberForm[N[3*10^-9], {Infinity, 10}] does not work. Thank you.

Andrew
- 1,499
- 9
- 25
- 37
0
votes
1 answer
How to get rid of unwanted white space using Manipulate Plot
I'm trying to make the next simple interactive plot:
Needs["PlotLegends`"]
rTE[\[Theta]_, n1_, n2_] :=
Abs[(n1*Cos[\[Theta]] -
n2*Cos[ArcSin[n1*Sin[\[Theta]]/n2]])/(n1*Cos[\[Theta]] +
…

Shakashazaam
- 5
- 2
0
votes
1 answer
Set::write error when using For loop
Solving a complicated formula f(u,v)==0, where
I assign some constant value to u and then solve v.
I can solve it without for-loop, but encounter errors by adding For[] enclosing the codes,
where saying
Set::write: Tag Times in "Solve[] with exact…

Derek Liu
- 31
- 2
- 9