All Questions

1
vote
1answer
40 views

Output cell written with NotebookWrite dissappears on whole notebook evaluation, yet remains if I individually evaluate it

Create a new notebook with the following two input cells: NotebookWrite[EvaluationNotebook[], Cell[BoxData[ToBoxes[Manipulator[Dynamic[x]]]], "Output"]] and ...
0
votes
0answers
61 views

E-mail and password [duplicate]

I've just learned Mathematica can send e-mails using external servers: this is great... ! Now, using this link, I've set this up using my Gmail account. But is it possible to incorporate somewhere my ...
0
votes
1answer
183 views

Simplify expression after substitution

I tried to substitue variable x of one equation with another variable z (z=nx/(nx+m)). See as follow: ...
0
votes
0answers
25 views
10
votes
1answer
148 views

Is there a way to find out who is importing a package?

After calling some functions, if I look into $ContextPath, I can see that JLink` is in there. Is there a way to find out what ...
17
votes
4answers
2k views

How to get intersection values from a parametric graph?

I have this graphed: ParametricPlot[{2.4*Cos[t] + 1.6*Cos[3 t/2], 2.4*Sin[t] - 1.6 Sin[3 t/2]}, {t, 0, 4*Pi}] It is a star, and the lines cross each other ...
3
votes
1answer
163 views

FullSimplify yielding different results in mathematica 8 and 9

I have been experiencing some problems running a certain mathematica file in version 9. I've tracked the problem to a particular sum that I perform. Running the same code in version 8 and 9 I get two ...
7
votes
4answers
166 views

Make which controls are visible in a Manipulate depend on a control value

I want to make a simple demonstration using Manipulate in which I have one or two input fields show depending on whether or not another control is True or False. How can I achieve such functionality? ...
-1
votes
1answer
180 views

Using functions to make loops

I'm trying to make a simulation of an electron that goes through a magnetic and electric field perpendicular to each other and to the velocity of the electron but I'm running in some troubles with the ...
9
votes
2answers
316 views

Recursive Integral for Volume of $n$-Ball

The volume of an $n$-ball (the $(n+1)$-dimensional analogue of a disk) of radius $r$ can be found by the following integral recurrence: $$V_0(r)=2r$$ ...
9
votes
4answers
387 views

How to bend a logarithmic number line into a circle

One way to plot a sequence of numbers on a logarithmic number line is this: ...
1
vote
2answers
257 views

Heron's formula for area of a triangle [closed]

Use the first form of Heron's formula to give a function areah, which gives the area of a triangle. Test your answer on the isosceles triangle ...
4
votes
3answers
221 views

Why does Integrate set the constant of integration to be one in this case?

Why does Integrate[(4 x)/(2 x + 1), x] give 1 + 2 x - Log[1 + 2 x] Notice the extra ...
0
votes
1answer
151 views

How can I get the beautiful font used in the Demonstrations web site in my notebook? [closed]

This question may be off-topic (if it is, I will delete it), but: What is the name of that beautiful monospace font used in the Wolfram Demonstrations source code snippets ?
5
votes
2answers
301 views

Optimum number of cog teeth for two step helical gearbox

Note: Cross-posted at http://community.wolfram.com/groups/-/m/t/137895?p_p_auth=8QnKtT9I. I am to design a two step gearbox. The first step is to choose the number of teeth in each cog wheel in ...
1
vote
1answer
79 views

An equivalent in Mathematica [duplicate]

Let's say I have a $n$x$m$ matrix $M$ in Matlab and I want to substitute the elements of $M$ that exceed $15$ for $-1$. In Matlab I just write M(M>15)=-1 and ...
4
votes
1answer
187 views

How can I stack plots so that they are aligned nicely? [duplicate]

Suppose that I have two plots (e.g., Plot, ListPlot, etc) that cover two regions of space. I would like to display them ...
4
votes
2answers
169 views

Total weight of a graph

I need to find the total weight of an WeightedAdjacencyGraph. I have a graph in that form ...
-1
votes
2answers
202 views

How to print prime numbers [closed]

I want to know how can I print out a list of prime numbers. Should I use For, Do, If, ...
12
votes
3answers
692 views

How can I type-check the arguments of a Mathematica function?

(For educational purposes) I defined the following functions: Translation (in $\mathbb{R}^2$): trM[vec_] := {{1, 0, vec[[1]]}, {0, 1, vec[[2]]}, {0, 0, 1}} ...
0
votes
2answers
132 views

Problem with Select and Pick

I want to filter a data file choosing those elements that match a condition and then plot them. Here is the corresponding code I use: ...
1
vote
4answers
151 views

Can I combine two FoldList into one?

I want get something like this: {{x, x}, {g[x, 1], f[x, 1]}, {g[g[x, 1], 2], f[f[x, 1], 2]}, {g[g[g[x, 1], 2], 3], f[f[f[x, 1], 2], 3]}} one way is ...
1
vote
1answer
106 views

Two quick Mathematica Questions about the dictionary

Question1: Get the list of pairs of the form {language,number of words in dictionary}. Call this list langlength What I did was this: ...
2
votes
0answers
143 views

NonlinearModelFit is not giving the fit with minimum chi^2

First of all, a bit of background, I am using Mathematica to fit angular distributions of gamma rays, so I apologize for some of the serious messiness in the formulas. The data is simple I have three ...
13
votes
4answers
782 views

Mathematica gives wrong result while Wolfram|Alpha is correct

Why does Mathematica and Wolfram|Alpha give different results based upon the same code? I know Wolfram|Alpha's 7.85 is correct.
10
votes
3answers
506 views

How to use legends from PlotLegends in LevelScheme?

I've been attempting to find efficient ways to generate graphics with legends for export, and have been working with both LevelScheme and the new (to v9) ...
2
votes
0answers
111 views

FeynRules Package

Does any one use the FeynRules package? If so, how can I implement a vertex of one Gluon and two octet scalars? I tried ...
3
votes
1answer
122 views

Should I end all definitions from packages with semicolon?

I noticed that if I open a .m file in Mathematica and click on the Run Package button, all the ...
2
votes
1answer
170 views

Judging the quality of fitting an EventData object to a distribution using LogRankTest

I have $389$ data points defined in an EventData object and want to judge the quality of fit of this data to a fitted $3$-parameter Weibull distribution. This ...
4
votes
3answers
833 views

Minimum spanning Tree from a weighted adjacency graph

Note: Cross-posted at http://community.wolfram.com/groups/-/m/t/137658?p_p_auth=8QnKtT9I I have a really big graph, 40x40. Here is my code ...
2
votes
0answers
100 views

How do I incorporate metadata using Export?

I have Export["file.png",codeThatMakesAGraphicsObject[],"PNG"]; and want to embed some specific metadata information. Is there a simple way to do that? Note ...
0
votes
0answers
173 views

Calling a DLL with two inputs and one output

I need to call a DLL that requires two real number inputs to get one real output back. I can get one of the simple example uses of DefineDLLFunction to work, but I ...
1
vote
2answers
278 views

Placing text inside a region with RegionPlot

I am plotting many regions with RegionPlot. I would like to label each region as I plot it so that I get something that looks like figure made with the following code: ...
10
votes
3answers
641 views

Insphere for Irregular Tetrahedron

I am looking for existing Mathematica code to compute the unique sphere inscribed inside an irregular tetrahedron. I can write it myself, but I would love to find that someone already performed this ...
19
votes
3answers
775 views

Strip waste braces in nested list

I have nested lists wherein there are a lot of waste levels which looks like l = {{{{{{2, 2}}, 3}, 2, {{2, 33}}, 4, 5}}}; I would like to reduce it to somthing ...
5
votes
1answer
68 views

Possible to include additional styles in context menu?

I am using Mathematica 9 on Windows 8, and I regularly want to use cell styles such as Section, SubSection and so on. If I click the + button before creating a new ...
-3
votes
3answers
189 views

Statistical analysis of a data file and its Plot [closed]

As the title says, I have an external data file which contains thousands lines of data. The data file contains eight columns and here is what I would like to plot: Let's assume that the length of the ...
1
vote
1answer
67 views

Substitute complex functions into complicated polynomials

Mathematica has some strange way of sorting terms. It seems that it is using a canonical sort on expressions, e.g. $\mathbb{i} \sin[x] \cos[y] \cos[z]$ is returned as $\mathbb{i} \cos[y] \cos[z] ...
4
votes
3answers
207 views

Upload CDF to Blogspot

I am trying to upload my CDF files to Blogspot. I tried the follow script: ...
3
votes
1answer
91 views

Make Entire Area of New Graphic Editable

Create a new graphic via the menu bar: Graphics -> New Graphic. The FullForm expression for this graphic is: ...
2
votes
1answer
149 views

How to enter a LaTeX integral?

How can I enter a LaTeX integral into Mathematica? For example, I evaluated the expression ToExpression["\int 2*x\[DifferentialD]x ", TeXForm] but Mathematica ...
5
votes
1answer
186 views

Using free-form linguistic input in a dynamic input field

I've been playing around with dynamic input fields; here's a basic example, which just consists of an input field where the user can enter a function and then a button that can be clicked to graph the ...
1
vote
0answers
132 views

LeastSquares with some parameters missing

I want to do a partial least squares (PLS) regression using LeastSquares on my data. The input parameters are temperature, humidity and pressure for a given date. ...
8
votes
3answers
602 views

How to typeset a system of equations

Is it possible to typeset systems of equations in Mathematica, and if so, how can I do it using a big left bracket as one could in LaTeX with \left\{ ... \.? I ...
2
votes
1answer
250 views

How to work with differentials explicitly?

When working with differential equations with independent (e.g. t )and dependent (e.g., x[t]) variables Mathematica expresses ...
1
vote
0answers
53 views

Memory Leak while running Animate/Manipulate/Export [duplicate]

While looking into building a simulation for an ant colony, I started encountering some memory leakage issues. ...
9
votes
4answers
402 views

When should I use Apply (or Function) and when @@ (or &)?

This is a rather general question, which I fail to answer myself. I guess it is mainly due to my insufficient knowledge of the precise terms. If I understand correctly, the following are equivalent: ...
2
votes
1answer
935 views

Can Mathematica solve integro-differential equations?

I have integro-differential equations like this: ...
4
votes
3answers
353 views

Plotting the convolution of the same probability density function with itself

I would like to compute the integral $$q_n(x)=\int_{B}^A q_{n-1} (\omega)f(x-\omega)\mathrm{d} \omega,\quad q_1=f,\quad n\geq 1.$$ for a given density function $f$. Basically it is the convolution ...
1
vote
1answer
216 views

Using ParametricNDSolveValue with initial conditions of another ParametricNDSolveValue

I have a system of parameter-dependent ODEs, which I can solve using ParametricNDSolveValue. Now, I have another ODE, which has as initial condition the solution of ...

15 30 50 per page