13
votes
3answers
249 views

Using Through to evaluate complex expressions

Suppose we're given the expression f*g+h, where f,g,h are all pure functions. How can we evaluate this expression on some ...
13
votes
6answers
1k views

Building a continued fraction

I've completed a problem that involves approximating $e$ by a continued fraction: $$\frac{N_1}{D_1+\frac{N_2}{D_2+\frac{N_3}{\ddots+\frac{N_k}{D_k}}}}$$ with the $N_i$ being the list ...
12
votes
3answers
663 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 <...
12
votes
1answer
211 views

Is there a good reason for the removal of this FrameTicks syntax?

In past versions of Mathematica one could use a terse syntax for FrameTicks: {bottom, left, top, right} In 10.1 this syntax is no longer recognized requiring the ...
12
votes
2answers
538 views

Copying Greek text from notebooks as unicode [duplicate]

Possible Duplicate: How to “Copy as Unicode” from a Notebook? How can I copy Greek text from notebooks as proper Unicode that can be pasted into other applications? If I type some ...
12
votes
1answer
410 views

Mathematica9: NDSolve slows down after repeated calls

Bug introduced in 9.0 or earlier and persisting through 10.4.1 or later I have noted that in Mathematica 9 my code, which involves a lot of calls to NDSolve, ...
12
votes
2answers
1k views

Labels and tickmarks inside Frame

Is there a way to force Plot and related functions to place the tick labels inside, rather than outside a frame? For example, consider, ...
11
votes
2answers
603 views

Nest , Fold … is there an extension for more than 2 arguments?

Fold is an extension of Nest for 2 arguments. How does one extend this concept to multiple arguments. Here is a trivial example: ...
10
votes
1answer
213 views

Notebook's WindowSize interference with contents' Dynamic ImageSizes

Bug introduced in 8 or earlier and persists through 10.4.0 or later Consider the following MWE: ...
10
votes
1answer
308 views

User-defined usage message template; removing repeated text

In Mathematica 9.0.1, I want to write a user-defined template for a function that I wrote: myfunc ...
9
votes
2answers
373 views

Complement on pre-sorted lists

Is there any way to instruct Complement to skip the sorting part? If the answer is no (likely), the next question would be: how can I remove from a sorted list ...
9
votes
1answer
578 views

Mathematica 10 doesn't support path containing Chinese characters

Bug introduced in 10.0 and fixed in 10.0.2 I tried to import file in Mathematica 10 ( windows 7 system), the path contains some chinese characters. After holding ctrl+shift, and drag the file into ...
9
votes
1answer
488 views

Making cells group

After reading rcollyer's post I'm still not able to understand how grouping rules work. Here is a problem I'm facing. What I want is to create a new title, section and subsection styles. I want the ...
8
votes
4answers
216 views

Hold expression with RandomInteger

One more question for today: I'm trying to show two random integers with a plus (+) sign between them, in an unevaluated form. I know how Hold and HoldForm work, but they hold everything, including ...
8
votes
1answer
524 views

Mathematica 9 can't integrate this function but earlier versions could

Integrate[ ArcTan[x]/(1 + x) Log[(1 + x^2)/2], {x, -1, 1}] I used Mathematica 9.0.1 on Windows7 32bit, Mathematica 9 cannot compute this, but Mathematica 8 gives ...
8
votes
2answers
937 views

Efficient by-element updates to SparseArrays

I have a very large SparseArray called A. What is the most efficient way to update say element ...
8
votes
3answers
338 views

GroupBy a list of associations with their keys

How can I go from ...
7
votes
5answers
3k views

Rescale axes (e.g change from Hz to THz)

I have multiple plots of permittivity against frequency, but they're hard to read because the frequency labels go from 4x10^14 to 1x10^15 in Hz. I want to label the frequency with THz instead of Hz, ...
7
votes
2answers
334 views

Using MatchQ (or other means) to parse an expression using sums of COS or SIN correctly

I am writing a function that will take an expression as input. I want to make sure the expression is valid first before processing it. Looking for a correct to use ...
7
votes
4answers
278 views

How do I invoke the default complexity function?

Documentation on ComplexityFunction says: With the default setting ComplexityFunction->Automatic, forms are ranked ...
7
votes
1answer
216 views

Possible bug involving Dataset/Query and RightComposition

Bug introduced in 10.0.0 and fixed in 10.0.1 Short Version Why are the results of the following expressions different? ...
7
votes
5answers
2k views

Label Markers On ListPlot

I would like to make a scatter plot where each element corresponds to a certain energy. Each plot marker should have its corresponding element next to it. IE. The data point at -1.16187 should have ...
7
votes
1answer
254 views

How to get all possible orderings (equal ranks allowed) for given set of $N$ objects?

Hope there is a solution besides the tedious generation of nested loops. (Trying to avoid reinventing the wheel.) Here is an example with $N = 3$ objects. There are $13$ needed orderings (first ...
7
votes
1answer
260 views

Unexpected behavior of GeometricTransformation

Bug introduced in 8.0 or earlier and persisting through 10.3 or later I have the following mapping on the complex plane: $$ z \mapsto \tau \mu z-1, $$ where $\mu$ is complex, $\tau$ is real number....
6
votes
1answer
2k views

Problem with plotting eigenvalues

I want to plot the eigenvalues of a matrix which is dependant on a parameter (well, actually I want to plot a tight-binding electronic band structure). The dimension of the hamitonian matrix is ...
6
votes
6answers
3k 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
4answers
441 views

Am I missing anything? Solving Equations

I want to know what $ a^4+b^4+c^4 $ would be when $ a+b+c=1, a^2+b^2+c^2=2, a^3+b^3+c^3=3. $ I tried ...
6
votes
2answers
2k views

How to convert a string of number into real numbers without precision loss

I searched and did not find similar answers which can resolve the 'no precision loss' issue. A sample string is: ...
5
votes
1answer
764 views

ReadList can't read from file containing high-precision Reals

I want to read a file which contains seven columns of real numbers. Mathematica seems to have a problem with the high precision I need. My code: ...
5
votes
3answers
368 views

How to change the color of specified digits in a number?

I've been playing with numerical approximations for irrational numbers, and would find it convenient to be able to highlight where these approximations deviate from the known correct answers. For ...
5
votes
1answer
531 views

“Show” with Manipulate runs fine normally, but gives errors as a CDF

I've simplified my code to what can reproduce my error. Basically, I have two lines: ...
5
votes
2answers
358 views

How can I insert an EPS file exported from RegionPlot into MS Word?

I generate a figure using RegionPlot and then Export it as "EPS". When I insert this picture ...
5
votes
3answers
246 views

Removing background from peak function

Let's say I have a a very large list of data in the format {{n,f[n]}} so something like {{1,600},{2,700},{3,1100}...} and if this data is plotted, then it will look like a sum of Gaussian functions+a ...
4
votes
1answer
2k views

Combined fitting via NonlinearModelFit

I am trying to fit my data to a combined function model. Say I have two functions with some common parameter(s) f[x_]:= a*x^2 + b*x + c g[x_]:= d*x^2 + e*x + c ...
4
votes
2answers
569 views

How to make slider in/visible in Manipulate?

I need your help with making a slider invisible and visible in a Manipulate. Here is my code: ...
4
votes
4answers
609 views

How to select interactively datasets to plot with Manipulate

I'm using Manipulate to visualize three datasets: Manipulate[ListPlot[WHAT -> what], {what, {dataset1, dataset2, dataset3}}] Now with this solution I can only ...
4
votes
1answer
724 views

How to do the polynomial stuff over finite fields extensions fast?

This question is raised from the problem of package FiniteFields being very slow (please, see the corresponding question): I have had an evidence that Mathematica ...
4
votes
2answers
424 views

How can I simplify $\log(512)$ to $9\log(2)$?

Can you explain me about the result of Integrate. ...
3
votes
2answers
342 views

Create custom shortcut to change font color

Just wondering if I can create a custom shortcut key to change the font color of the notebook text. I've created a custom shortcut (in dkyeventtransactions.tr) to bring up the font color dialog, as ...
3
votes
1answer
199 views

replacement rule to pull independent expression outside of Integrate

I'm trying to write a fairly general replacement rule that will pull expressions independent of the variable of integration outside of Integrate, since Simplify and ...
3
votes
1answer
187 views

SocialMediaData doesn't show all Facebook friends

When I ran SocialMediaData["Facebook", "FriendNetwork"] I used to get all of my Facebook friends (or at least almost all of them)--nearly 1000. But now when I ...
3
votes
1answer
1k views

How to set default save directory for notebooks?

Based on certain previous questions, I figured that if my NotebookBrowseDirectory looked like this ...
3
votes
2answers
372 views

How to replace subscript symbols

I have an expression with subscripted variables. I would like to replace all those terms with other symbols. For example, $P_1 + P_2^3 \rightarrow P1 + P2^3$ I used the following code but it doesn't ...
3
votes
2answers
154 views

How to prevent Round with hided fractions

I found a strange behavior in Round. If we try: ToString[Round[4.811, 0.01], InputForm] we get: 4.8100000000000005 When I expected 4.81 In order to ...
2
votes
1answer
833 views

Data filtering using Butterworth filter

I want to filter data using Butterworth filter. I am currently using Matlab and I want to know how to do it in Mathematica. I have the following data: ...
2
votes
3answers
234 views

Why do these two different zetas produce the same value?

Zeta[-13] == Zeta[-1] == -1/12 Why do these two different zetas produce the same value?
2
votes
2answers
361 views

NIntegrate over a list of functions

This question is the result of these other two questions. Question 1 and 2. I thought it would be better to ask a new question rather than deleting previous one. I think When ...
2
votes
1answer
143 views

Package editor interface

Is there a way to get rid of the unused space on the left of the package editor? What is it's purpose if I configured Mathematica to not show In and ...
2
votes
3answers
6k views

Step-by-step definite integration

I am interested in obtaining the intermediate steps for rather straightforward symbolic definite integrations (e.g., from an elementary calculus text). As an example, for $\int_0^1 x\,dx$ I'd like ...
2
votes
2answers
144 views

Why can't I import a file in the init.m file?

I would like to have some data read in every time the kernel starts, but it doesn't seem to work. Say I have a CSV file I want to have read in, for example I use: ...

15 30 50 per page