1
vote
0answers
28 views

Plots to check all assumptions of linear regression

I'm running a linear regression with LinearModelFit and would like to plot graphs to check the assumptions of linear regression: linearity, independence of the ...
3
votes
3answers
616 views

Superscript prime symbol

x\[Prime] looks like $x_'$, ugly right? Is there a way to make a symbol with prime to look like $x'$? That's what I'm trying right now: ...
11
votes
7answers
2k views

Recursive function with if-statement

I am trying to represent the following function definition in Mathematica: $$\begin{align*} f(1)&=1 \\ f(2n)&= \begin{cases}f(n) & \text{if}\space n\equiv0\pmod{2} \\ 2f(n) & ...
6
votes
0answers
57 views

ParametricPlot MeshStyle bug in v10?

The documentation gives the following code and says "Use a red mesh in the x direction and a blue mesh in the y direction:" ...
1
vote
2answers
111 views

Difference between double quotes

I have a notebook and I enter something like PlotLabel->"my label with dynamic number "<>ToString[strange] and I get errors like However, the double ...
0
votes
2answers
65 views

Problem in downloading “ToMatLab” package [duplicate]

Iam trying to download "ToMatLab" Package from http://library.wolfram.com/infocenter/MathSource/577/ but it is showing me an error message by showing a big question mark and "File could not be ...
4
votes
1answer
55 views

Problem with Neumann condition in quarter disc

So I'm following the available examples in version 10 for FEM, The plane stress operator is shown as this ...
306
votes
12answers
56k views

Where can I find examples of good Mathematica programming practice?

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...
2
votes
3answers
72 views

Include Formatting Save As .nb to .m

Is there a way to export Input Cells in my current notebook(.nb) as a .m file while including indents? For example if my notebook contains ...
1
vote
1answer
72 views

Problem using Compiled Function within NProbability

I've built a very simple function to estimate the probability for a Long Straddle (derivative strategy) to be positive at expiration. ...
2
votes
2answers
105 views

Matching a case when one element in a pair is Null

I've got a dataset of laitutdes and longitudes. Unfortunately, some of the dataset was from when a time when lat/longs weren't constantly recorded. So I need to remove the invalid data before working ...
-4
votes
0answers
51 views

Need help with GRE study question [on hold]

I encountered a question while preparing for GRE and am stuck. In an examination paper of 5 Questions, 5 percent of the candidates answered all of them and 5 percent none. Of the rest, 25 percent ...
0
votes
2answers
43 views

Restrict plot of object to be below a given plane in a ContourPlot3D

In a ContourPlot3D, I only want to part of the plot. Such as the part of a cylinder that lies beneath a plane. ...
5
votes
1answer
154 views

How can I read compressed .Z file automatically by Mathematica?

When I read .Z file by something like jpldatstring = Import["ftp://cddis.gsfc.nasa.gov/products/jpl/2003/jplg0040.04i.Z"] Unfortunately, it turned out that ...
1
vote
1answer
260 views

DSolve will not apply assumption `m ∈ Integers`

I am trying to solve a linear second order ODE using DSolve which involves an arbitrary integer m. ...
0
votes
1answer
63 views

Functions in functions

I have three functions f(x,y) , g(t) , and h(t) and somehow I have to find (d/dt)f(g(t),h(t)) where t = 0. How would I go about writing this in Mathematica? In this equation g(t) is taking place of x ...
1
vote
3answers
184 views

How to generate new random numbers in a Manipulate only on demand?

I was playing with a Manipulateto visually compare calculating the mean of Normal and Cauchy random data. ...
0
votes
0answers
46 views

Calculating Value-At-Risk (VaR) in Mathematica. A simple code [on hold]

Calculating Value-At-Risk in Mathematica Obtaining data (Microsoft. Daily returns 2014): msftreturn = FinancialData["MSFT", "Return", "2014"][[All, 2]]; Code: ...
2
votes
2answers
110 views

Solving 4 variable system of equations

Trying to solve a systems of equations. Here's the code: ...
3
votes
1answer
111 views

ArrayPlot copied to PDF shows blurred mesh

Certain (but not all) images displayed in ArrayPlot, and then copied to PDF, show what appear to be fuzzy mesh lines in white areas. An example is shown below. I ...
0
votes
2answers
147 views

Time value of Money Functions combined

I am trying to combine multiple functions into one. I have defined following functions: (PV refers to Present value, FV refers to Future value, i or IPER refers to interest per period, pmt refers to ...
0
votes
1answer
117 views

Problem with NDSolve [on hold]

I'm solving a PDE that is partially elliptic. So I need to solve the equation iteratively. My problem is at the end of the code. I'm doing interactions manually in order to evaluate the code. At the ...
21
votes
2answers
651 views

Movable text on a curve

Having an arbitrary curve defined as InterpolatingFunction, what is the best way to place a text on this curve? The text generally has two rows, for example: ...
2
votes
1answer
48 views

Problem with Style in a Plot

I would like to simply plot a density function $f_1$ and I would like to put a legend but I cannot do it as I wish. The problem is simple but I spent alot of time and couldnt solve it. I will be happy ...
8
votes
1answer
484 views

Problems with “Test Connectivity” and the Pacletserver

I know there has been a similar questions to this already but the solution did not work for me so here again: I have internet connection and I can execute such commands like: ...
1
vote
1answer
40 views

Automatically to add some points for a plot

Say I want to plot this Plot[x,Sin[x],{x,0,4 Pi}] And I want it to show 4 nicely spaced points, on the line. Is there an automatic way to do this? I was reading ...
2
votes
3answers
135 views

Applying Labeled Option to Multiple Options

First post. Hope it's not ignorant. I am trying to label several data points so I can label them properly on a ListLinePlot. I know I can label plots if I am ...
2
votes
1answer
44 views

Struggling with FindFit

I'm trying to fit a sinusoidal wave to some numerical data. I can do it by hand using manipulate, so I know roughly the sort of parameter values that I should get back, but functions such as FindFit ...
2
votes
3answers
130 views

Extracting coefficients from a power series

I have a function defined explicitly as a power series: $$\sum_{n=0}^\infty{T_n}\frac{x^n}{n!}=\frac{\frac{x^3}{3!}}{e^x-1-x-\frac{x^2}{2!}}$$ and I would like to extract the coefficients $T_k$ as ...
7
votes
2answers
110 views
+50

Catching error in middle of evaluation of compiled function

I have programmed and Compileed a complicated numerical function. The function has singularities (i.e. are infinite) at certain input numerical values. I need to ...
5
votes
2answers
95 views

ListPlot inserts extra PlotMarkers and Mesh at crossing points

In the example below, ListPlot with PlotMarkers -> Automatic and a variant using ...
0
votes
0answers
39 views

How to make an effective use of Mathematica to evaluate integrals, series, recognize closed forms, and do other manipulations [on hold]

I would like to know if there are resources to learn how to use the functions of Mathematica in the most effective way in order to evaluate difficult integrals and series or find possible closed forms ...
2
votes
0answers
86 views

What is the algorithm behind Mathematicas Reduce in this equation?

Mathematica can use Reduce to arrive at an answer in this equation ...
7
votes
1answer
219 views

How do I generate cross sections of a 3D graphic?

I would like to approximate the volume of a bottle by summing up the volume of the individual disks. I have obtained code references from a demonstration. But how do I generate the cross sections? The ...
17
votes
2answers
1k views

Drawing pairs (planar graph, circle packing)

Circle packing theorem states: For every connected simple planar graph G there is a circle packing in the plane whose intersection graph is (isomorphic to) G. How to use Mathematica to draw examples ...
7
votes
0answers
60 views

Is there a way to stop Export if the file size is too big?

I've got code that's exporting a file, but the file might be so big that it will take up too much space on the cluster I'm using and crash other users' processes. Is there anything like ...
2
votes
1answer
32 views

Truncating power series

I have the following typed up so as to truncate higher powers of $\tau$, ...
-1
votes
0answers
38 views

Taylor Polynomials and Approximations in Mathematica [on hold]

I have to solve number 112 parts a, b, and c and number 113 parts a and b using Mathematica. I am very new to Mathematica so any and all help would be greatly appreciated. Click the link below to view ...
5
votes
5answers
278 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 ...
3
votes
0answers
24 views

To UpSet or not to UpSet when using MakeBoxes

What is the difference between the following two: ...
0
votes
1answer
48 views

How to tell Eigensystem the type of the elements comprising a matrix I would like to diagonalize

How can I tell Eigensystem that a matrix $M$, which I would like to diagonalize, is a numerical matrix of complex numbers? My idea is that this information could ...
0
votes
0answers
46 views

Turning a 2D 3 body problem into 3D not so easy?

I have programmed a 3 body problem, that can in theory work for more than 3 bodies. I apologize in advance for the length of the code that I posted, I don't really know how much one would need to ...
2
votes
1answer
48 views

Identically styled cells from ToBoxes and Cell do not align

I'm trying to generate some worksheets using NotebookWrite so that I can control the page breaks, but have got stuck on the alignment as there appears to be a ...
5
votes
2answers
123 views

Understand MeshFunctions with Intercepts

Bug introduced in 7.0.1 or earlier and persisting through 10.0.1 or later While I've been thinking about this question, I tried to visualize the Intercepts. I use three snippets, actually snippet ...
3
votes
1answer
109 views

How to remove recursion, and write it functional and efficient way?

I wish to implement the following recursion efficiently. ...
3
votes
2answers
177 views

Plane Geometry Diagrams With Labels

I can make some basic diagrams in Mathematica (stolen from their pages, for example see the below: LaminaData["FilledIsoscelesTriangle", "Diagram"] However, I'm ...
2
votes
1answer
81 views

Mean curvature of Sphere

I am trying to calculate mean curvature of a parametric surface(like sphere), and I wrote this code based on this discussion. Here is my code: ...
4
votes
1answer
50 views

How to use Tandem Queueing Network Process?

Mathematica provides QueueingNetworkProcess and QueueingProcess. However, I can't seem to figure out how to create a tandem ...
14
votes
3answers
457 views

Drawing the schematic diagram of algorithm

The B-Spline function used the alogrithm as shown below: I would like to draw it in Mathematica (Although this is my first time to use TreePlot) ...

15 30 50 per page