Questions tagged [version-7]

Version-specific issues for Mathematica 7 (other than bugs).

Filter by
Sorted by
Tagged with
28 votes
5 answers
6k views

What is the right way to rotate an array?

Suppose I have an array, not necessarily square: a = $\left( \begin{array}{ccc} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{array} \right)$ I want to rotate it like one ...
Mr.Wizard's user avatar
  • 271k
15 votes
3 answers
2k views

Why does Hash return different values in Version 7?

This function does not work correctly for me. The generated Gravatars do not match the ones actually produced by using the corresponding address. The problem was traced to differing output from the <...
Mr.Wizard's user avatar
  • 271k
13 votes
6 answers
1k views

Sort+Union on a list

Probably this is too trivial question for this forum but for some reason I am not getting it on my Mathematica 7 so far. I have a list ...
dbm's user avatar
  • 1,239
13 votes
2 answers
2k views

Problem importing URL with Greek characters

I'm considering buying a car. So I thought why not make a web-crawler in Mathematica to pile-up car data? Brilliant idea. Then I found this Greek website, gocar.gr, which just so happens to have all ...
kalt's user avatar
  • 343
13 votes
2 answers
468 views

Internal "Periodical" functions in version 7

In version 7 there exist these Internal` context functions: ?Internal`*Periodical* AddPeriodical   ...
Mr.Wizard's user avatar
  • 271k
13 votes
2 answers
1k views

backward compatibility

When producing or enhancing code, it is tempting to use recent new primitives of Mathematica introduced in version 7 and 8, but for library code or in preparation or future version change in ...
ogerard's user avatar
  • 957
11 votes
4 answers
338 views

How to plot $x^2$ over $-5<x<-1\cup1<x<5$

Is it possible to plot a function over a interval with a gap in the middle; e.g., $f(x)=x^2$ over $-5<x<-1\cup1<x<5$? I am using Mathematica 7 and most of the options in the answers don't ...
gbd's user avatar
  • 409
11 votes
1 answer
1k views

How to add a fading trail effect in Animate?

I would like to add a smooth fading effect to the end of a curve, while it is animated. Here's a minimal working example which shows a particle moving on a circle (the circle is drawn while the ...
Cham's user avatar
  • 4,083
11 votes
1 answer
1k views

PrintTemporary in ParallelTable

I thought of a possible answer to Monitor doesn't work with ParallelTable but it doesn't work as I hoped it would. This accumulates print cells instead of deleting them as intended. Can it be ...
Mr.Wizard's user avatar
  • 271k
10 votes
2 answers
7k views

Legends in combined Plot and ListPlot

I have a set of data ...
dbm's user avatar
  • 1,239
8 votes
1 answer
193 views

$InputFileName backwards compatibility

What would be a good replacement for $InputFileName (which has been added recently to Mathematica 8) to achieve backwards compatibility with let's say M6 and M7? I ...
phantomas1234's user avatar
7 votes
2 answers
1k views

Graphene bilayer rotation

How can we design the rotational picture of bilayer graphene using Mathematica 7.0 like in the figure? This gives Moire pattern
Ishwor Khadka's user avatar
7 votes
3 answers
771 views

How to randomly erode a 3D distribution of points with Mma 7.0?

Suppose we have a 3D distribution of points, like the spherical ball example below : ...
Cham's user avatar
  • 4,083
7 votes
1 answer
2k views

Mathematica: Label specific vertices in GraphPlot

How can I label particular vertices in GraphPlot? And have the arrows space out accordingly, for the width of the label? I have Mathematica 7, but I think this question applies to all versions. Edit:...
Mr. Demetrius Michael's user avatar
7 votes
2 answers
615 views

Tick marks shrinking with ImageResolution [duplicate]

High resolution PNG export is handy for print quality plots, however tick marks are not scaling properly. Does anyone know a solution or a work-around, preferably for M7 (on Win7)? ...
Chris Degnen's user avatar
  • 30.9k
6 votes
2 answers
357 views

How to generate randomly curved and twisted strings in 3D?

Here's a code that draws a set of random straight lines in 3D: ...
Cham's user avatar
  • 4,083
6 votes
1 answer
2k views

Sorting an Array with words in different languages

Array consists of words of different languages. I need to sort elements in reverse alphabetical order and make a list of elements, which consist of english letters. Example of array which consist of ...
Bakkkss's user avatar
  • 63
6 votes
1 answer
4k views

How to take the derivative w.r.t. an arbitrary function?

EDIT: The answer posted by @Jens works for built-in functions only. However I'm starting to wonder if this is related to my Mathematica install somehow. I have version 7. Here is an example in the ...
John Hyatt's user avatar
6 votes
2 answers
615 views

NullSpace[_, Method->"OneStepRowReduction"] is sometimes wrong; how can I work out when this happens?

Edit 2015: Has this been fixed yet? (This is on MMA 7.0.1.0 on OS X) I've just found a large matrix m for which NullSpace[m] ...
Scott Morrison's user avatar
5 votes
1 answer
311 views

Exported animated gif with matrices will not work?

I want to export a list of matrices as a gif so that they will appear one after another 2 seconds apart. I've tried the following but when I open it up it only does the first two matrices and I have ...
user32462's user avatar
  • 161
5 votes
1 answer
216 views

How to get fuzzy points in a 3D view?

I would like to produce fuzzy random points (sprites like) in a 3D view. Applying a Blur command doesn't do the trick since the view is then frozen and we couldn't rotate the view anymore, and I don'...
Cham's user avatar
  • 4,083
4 votes
3 answers
365 views

How can I add a few specific mesh (altitude-like level) curves to a plot?

I'm plotting the numerical solution of a differential equations, using the altitude-like level curves as a mesh. It's fine, but I would like to add three specific altitude levels as thick red, green ...
Cham's user avatar
  • 4,083
4 votes
3 answers
454 views

How to draw random colorfull domains in a plane?

I'm trying to produce some graphics like the one shown below, with a few adjustable parameters to change the number and size of cells. The cells positions, sizes and colors should all be random (size ...
Cham's user avatar
  • 4,083
4 votes
1 answer
658 views

Plot: How set markers in plot in front of axes

I draw a plot using ListPlot. But I noticed that PlotMarkers are 'covered' by the axes; see example below: I was trying to use ...
Ziva's user avatar
  • 817
4 votes
1 answer
139 views

Is it possible to enable syntax highlighting for \[Function]?

This is a bit of a long shot but I am wondering if it is possible to enable syntax highlighting in a function defined with \[Function] without resorting to anything ...
Mr.Wizard's user avatar
  • 271k
4 votes
1 answer
132 views

Small output glitch with Histogram

I'm experiencing a small formating glitch with an histogram. I want to define an histogram with a square frame, with precise vertical ticks from 0 to 10. But I'm still getting a larger range, and I ...
Cham's user avatar
  • 4,083
4 votes
1 answer
510 views

Sporadic bug in Mathematica 7.01.0 MatrixPower and/or Eigensystem functions on floating-point symmetric matrices with repeated eigenvalues

Note: From the comments submitted below by other StackExchange users it appears that this apparent bug was fixed sometime after version 7.0.1. I asked a vague variant of this question a few days ago, ...
J Tyson's user avatar
  • 113
4 votes
3 answers
249 views

How to draw borders around tiles of the same color?

I'm having difficulties with a project to show random tiles with a few random colors. Here's the code that I need to modify: ...
Cham's user avatar
  • 4,083
4 votes
0 answers
130 views

Error with String patterns producing Removed["$$Failure"]

While working on How to capitalize the first letter of each word in a string and trying to understand why certain characters were not considered letters I tried this: ...
Mr.Wizard's user avatar
  • 271k
3 votes
3 answers
2k views

Random non-overlapping disks in a square

I've found a nice code snippet by @belisarius from this question, that I'll reproduce here for reference: ...
Cham's user avatar
  • 4,083
3 votes
3 answers
882 views

Colorize a 3D distribution of points according to density

Suppose we have some random 3D distribution of points. I'll use the spherical ball defined below as an example and a starting point for the discussion here : ...
Cham's user avatar
  • 4,083
3 votes
1 answer
195 views

How to define a smooth function of random bumps in a plane?

I would like to define a simple function that gives random smooth bumps in a plane, a bit like the clumsy picture below, but it should be continuous: ...
Cham's user avatar
  • 4,083
3 votes
3 answers
109 views

Reduction of repetitive calculations in Table

If I generate two tables inside a function which are function[n_, x_, y_]:=( table1 = Table[i* x/n^x, {i,1,n}]; table2 = Table[i* y/n^y, {i,1,n}]; ) where <...
SugerBoy's user avatar
3 votes
1 answer
513 views

ListPlot - plotting values with different range

I have three tables: L, S and U. In first table I have values from range (0,1), in second ...
Ziva's user avatar
  • 817
3 votes
1 answer
593 views

How to align text to left and output to right, in manipulate?

I need to show a layer of information on a 3D graphics, inside a manipulate box. Currently, all the code is working great, except that the text should be aligned to the left, while the output numbers ...
Cham's user avatar
  • 4,083
3 votes
1 answer
167 views

Bug with LinearProgramming on Integers?

With Mathematica 7: LinearProgramming[{1, 1}, {{0, 0}, {1, 1}}, {1, 1}, Automatic, Integers] gives wrong result {0,1}. But <...
Tobias's user avatar
  • 73
3 votes
2 answers
499 views

How can I style a TabView?

I have been trying to style a TabView like in the examples on the Wolfram CDF site, where they have custom sizes and backgrounds with images or gradients, but I am ...
andrew's user avatar
  • 41
2 votes
2 answers
2k views

How can I add a checkbox to a Manipulate expression?

I'm looking for a simple example about how to add a simple On-Off switch in a manipulate function. More specifically, I defined a curve with two parameters. One is a continuous parameter that is ...
Cham's user avatar
  • 4,083
2 votes
2 answers
192 views

How to mix symbols and text for labels in manipulate? [closed]

I'm creating a big manipulate box with several sliders, and each slider must have a small explication text (units, for example) after a mathematical symbol. As a simple example, here's the code I'm ...
Cham's user avatar
  • 4,083
2 votes
1 answer
6k views

ListPlot doesn't shows all points [closed]

I have a table: p1 = Table[(Binomial[2000, k]*StirlingS2[1386, k]*k!)/(2000^1386), {k, 1, 1386, 1}]; I used ListPlot[p1] ...
Ziva's user avatar
  • 817
2 votes
1 answer
412 views

Alt+Gr issue with Mathematica 7 on linux

I have the same issue as described in https://matteochinazzi.wordpress.com/2010/04/12/mathematica-alt-gr-issue-under-linux/ So basically whenever I use AltGr to write [ or ] in Mathematica, it ...
pandam0n1um's user avatar
2 votes
2 answers
343 views

How to define the density of random 3D points and plot it?

The following code draws a random distribution of particles in 3D. The Manipulate box allows to change a few parameters (number of particles, size of clusters, ...). I would like to define the local ...
Cham's user avatar
  • 4,083
2 votes
1 answer
82 views

How to insert variable height in this random bumps function?

I'm trying to insert a "time" variable that control the height of the random smooth bumps, but I'm yet unable to do it right, as shown with the code below: ...
Cham's user avatar
  • 4,083
2 votes
1 answer
499 views

How to extract the bin width from a Histogram made with an automatic binning method?

I am using the Scott binning method with Histogram and Histogram3D to plot some data. How could I find out the bin width chosen ...
Alejandro Diaz Ortiz's user avatar
2 votes
1 answer
154 views

How to make this moving surface a continuous and derivable function?

I'm having troubles in defining a function of three variables: $t$, $x$, $y$, from a moving bumpy surface that should be derivable relative to its three variables. Here's the animated surface code, ...
Cham's user avatar
  • 4,083
2 votes
1 answer
91 views

Error with comments inside and expression

I found this strange parsing error with comments inside of an expression in Version 7. And example is {{1, x}, {1, y} (* {1, z (= 5+6)} *)}; It occurs depending ...
Nikolaj-K's user avatar
  • 1,485
2 votes
1 answer
473 views

Warning and Errors during Compile

I defined a compiled function cf = Compile[{{x, _Integer}, {n, _Integer}}, z = (n^x); Binomial[n, #]* StirlingS2[x, #] *(#!)/z & /@ Range[x]]; and I ...
SugerBoy's user avatar
2 votes
1 answer
1k views

Repeated convergence test failure and why?

i have assigned all the values and the ODE assigned is as this ...
dcydhb's user avatar
  • 615
2 votes
1 answer
271 views

Random phases at each run in a wave superposition [closed]

I need to define a function which generates a random real number between 0 and $2\pi$, as a random phase constant for a wave superposition. The output should be different each time I re-run the code, ...
Cham's user avatar
  • 4,083
2 votes
1 answer
1k views

Place legend without border above the plot

I use Mathematica 7.0 and as far as I know, there is not method PlotLegends, only PlotLegend. I want to set my legend - without background, shadow and frame - above my plot, as in the example belowe: ...
Ziva's user avatar
  • 817