Questions tagged [mathematica-8]

For questions specific to version 8.x.x of Wolfram Mathematica, or not applicable to versions 7 or earlier. Dedicated Mathematica Stack Exchange site: https://mathematica.stackexchange.com/

199 questions
238
votes
1 answer

Minimizing NExpectation for a custom distribution in Mathematica

This relates to an earlier question from back in June: Calculating expectation for a custom distribution in Mathematica I have a custom mixed distribution defined using a second custom distribution following along the lines discussed by @Sasha in a…
Jagra
  • 3,149
  • 1
  • 18
  • 19
59
votes
3 answers

Integrating notebooks to Mathematica's documentation center

If you have been using Mathematica for a while you probably have grown attached to the documentation center. There is always something new that you find in those pages. Let it be options for a function or just some examples that at some point did…
jmlopez
  • 4,853
  • 4
  • 40
  • 74
23
votes
4 answers

What are the benefits of switching from Rule and /. to OptionsPattern[] and OptionValue in a large application?

Old habits die hard, and I realise that I have been using opts___Rule pattern-matching and constructs like thisoption /. {opts} /. Options[myfunction] in the very large package that I'm currently developing. Sal Manango's "Mathematica Cookbook"…
Verbeia
  • 4,400
  • 2
  • 23
  • 44
22
votes
1 answer

Why does Mathematica use an underscore when defining parameters?

For example if I was defining the following function exprod[n_] := Expand[Product[x + i, {i, 1, n}]] Then why is the underscore after the variable n, necessary in the function definition? Where does this style come from or is it specific only to…
EthanLWillis
  • 930
  • 4
  • 14
  • 27
19
votes
2 answers

Doing probabilistic calculations on a higher abstraction level

To the downvoters: this isn't a question about mathematics, it's a question about the programming language Mathematica. One of the prime characteristics of Mathematica is that it can deal with many things symbolically. But if you come to think…
Sjoerd C. de Vries
  • 16,122
  • 3
  • 42
  • 94
16
votes
1 answer

Could the notebook StyleSheet change the code behaviour?

I'd like to ask if someone had such a problem before. I have version 8.01, on windows 7, 64 bit. SP1. I have been trying to find why I get Mathematica kernel crash when I added a Tooltip[] command to some code I am writing. The notebook has the…
Nasser
  • 12,849
  • 6
  • 52
  • 104
16
votes
2 answers

How to generate animated GIF of a Manipulate? 8.0.1

Exporting to animated gif seems to have changed in Mathematica 8.0.1? I normally make animated GIFs of a manipulate by simply writing: v=Manipulate[....] then Export["foo.gif",v]; But now it does not work. I just get one static image. Here is an…
Nasser
  • 12,849
  • 6
  • 52
  • 104
15
votes
4 answers

Import data from URL

The St. Louis Federal Reserve Bank has a great set of data available on a variety of their web pages, such…
Jagra
  • 3,149
  • 1
  • 18
  • 19
15
votes
2 answers

Does passing a variable with a large amount of data cost a lot of memory and time in Mathematica?

I am coding up an algorithm for constructing a suffix tree in Mathematica based on Ukkonen's algorithm. The question I have is, will passing my entire tree structure (which I have stored in a list) to a function to search through, cost my program a…
Steve
  • 1,105
  • 7
  • 20
15
votes
1 answer

How to configure parallel remote kernels in Mathematica?

When I try to configure remote kernels in mathematica via Evaluation>Parallel Kernel Configuration ... then I go to "Remote Kernels" and add hosts. After that I try to Launch the remote kernels and only some of them get launched (the number of them…
Ivan
  • 151
  • 1
  • 3
14
votes
2 answers

How to define an arbitrary discrete probability distribution with a list of mass without warnings

In Mathematica 8, I want to define a discrete distribution with density mass given as a list. For example, In[1] f = ProbabilityDistribution[{2/3, 1/3}[[x]], {x, 1, 2, 1}]; This seems to work. However, this emitted a twice-repeated…
Seiji Kumagai
  • 230
  • 3
  • 10
14
votes
2 answers

Mathematica: Transparent background with PNG

This is most likely a bug in Mathematica 8.0.1 and maybe other versions too. Lets try the following: Table[ Export[ "Res_" <> ToString[r] <> ".png", Rasterize[ Style[x^2 + y^2, 40], Background -> None, ImageResolution -> r ], Background…
jmlopez
  • 4,853
  • 4
  • 40
  • 74
13
votes
2 answers

How do you work out Conditional Probabilities in Mathematica. Is it possible?

Can Mathematica do Bayes Rule conditional probability calculations, without doing the calculation manually? If so how? I have been searching both the Mathemtaica doco and the web for a hint but cannot find anything. I am not after how to do Bayes…
Bart
  • 225
  • 2
  • 5
13
votes
4 answers

Monitoring Process of Cases[] on a Very Large Body of Information

I'm currently undertaking operations on a very large body of text (~290MB of plain text in one file). After importing it into Mathematica 8, I'm currently beginning operations to break it down into lowercase words, etc. so I can begin textual…
canadian_scholar
  • 1,315
  • 12
  • 26
12
votes
5 answers

Is there any efficient easy way to compare two lists with the same length with Mathematica?

Given two lists A={a1,a2,a3,...an} and B={b1,b2,b3,...bn}, I would say A>=B if and only if all ai>=bi. There is a built-in logical comparison of two lists, A==B, but no A>B. Do we need to compare each element like…
Osiris Xu
  • 713
  • 1
  • 5
  • 13
1
2 3
13 14