1
vote
1answer
52 views

How can use Table for two functions obtained from NDSolve? [on hold]

I have obtained a numerical solution using NDSolve for two functions a(x) and b(x). how do I use Table to make a list of a(x) vs b(x) values. is it simply Table[{a(x),b(x)},{x,0,100}] or should I use ...
0
votes
0answers
29 views

How to use ListLinePlot to draw graph of a function vs another function obtained from NDSolve? [on hold]

Using NDSolve I have found solution of two function $\phi(z)$ and $f(z)$. then I use ListLinePlot to find a plot of ...
3
votes
1answer
65 views

How do I label points when using Graphics? [on hold]

Let say I want to draw a point and label it. The command I use to draw points is Graphics[{Point[{0,0}], Point[{1,1}]}] This draws the points $(0,0)$ and ...
5
votes
1answer
74 views

Visualize Pascal's triangle with the product of the terms in the $n$th row

How to make the following graphics by using Mathematica? What I tried: I used J.M's answer for the Pascal triangle ...
3
votes
3answers
166 views

Looking for a better way to delete an arbitrary list of rows from a matrix

Delete is not suitable to delete the rows of a matrix, as illustrated below: ...
2
votes
2answers
45 views

Difficulty finding roots of an interpolation function from NDSolve

I have been trying to find the point at which one of the solutions of a system of two ODEs crosses zero. I used the method suggested in this answer to a previous question, which seemed to be the most ...
2
votes
0answers
15 views

Is it possible to highlight nonconsecutive words in any given text cell?

This is a bit of a miscellaneous question, so I'm not entirely sure how to tag it properly. Windows users can use the CTRL button (and Mac users, Command if I'm not mistaken) as a sort of hotkey to ...
1
vote
3answers
121 views

Basic Programming in Mathematica - How to build a loop [on hold]

I want to build a loop with the following rules: I have a list a={5,7,8,9,5,6,8,6,7,8}. I want to print the mean of the first two ...
0
votes
0answers
28 views

Set more constrains on a function in Do loop with If condition [on hold]

This post is an extension of the post: Do loop with If condition The answer of @JasonB worked fine with me. that to use Reap ...
4
votes
0answers
31 views

Collapse cell groups when you close parent group?

I have a particularly long notebook. Here's what I'd like to do: to say in my stylesheet that upon closing certain types of cell-groups that all the cell-groups inside should close as well. That way ...
2
votes
1answer
48 views

Image background for cell?

I'd like to make code Cells have a specific background image. I know you can do this for Notebooks, but what about Cells? This simple test fails: ...
0
votes
0answers
28 views

Conditioned Minimum [on hold]

How do I say to NMinimize that I want to know the point $(x_{0},y_{0},z_{0})$ where the minimum of a function f[x,y,x] is ...
1
vote
1answer
62 views

How to solve different PDE defined in different regions coupled through boundary condition

I would like to solve two different partial differential equations each one defined in a different region and in different coordinates. However the equations are coupled through a boundary condition ...
2
votes
0answers
35 views

Series expansion in Infinity issue with Zeta(s) function

With this code: Series[Zeta[s], {s, Infinity, #}] & /@ Range[10] // MatrixForm Series expansion for the Zeta(s) ...
-3
votes
0answers
40 views

help with basic matrix multiplication! [closed]

This is my code. It is simple enough. ...
2
votes
1answer
64 views

Will the solution NDSolveValue finds outside of the region I give it give me bogus results?

I'm using NDSolveValue to solve Laplace's equation for a relatively simple system. I have two rectangles, separated by a small gap, which I define using RegionDifference: ...
2
votes
2answers
95 views

Replace non-zero elements with symbol

I have a very large matrix (tensor) in Mathematica with some zero and non-zero elements. I am interested in replacing the non-zero elements with some symbol or a 1 so that it is easier to view the ...
2
votes
3answers
86 views

Manipulate a Show [duplicate]

It takes me a long time to construct the following picture: ...
0
votes
0answers
23 views

Compiled function giving error CompiledFunction::cfct [closed]

I'm trying to compile this function LocalPotential below: ...
5
votes
1answer
46 views

Different options for ResamplingMethod specification

Is there an option for ResamplingMethod (or any other practical way) for specifying different behaviours of the interpolation, depending on, for instance, closest dates (on the ...
-2
votes
0answers
43 views

Getting error message from Minimize [on hold]

I have acountered a problem I can't fix on my own, even though the problem seems quite simple. Problem The objective function (<<1>>) should be scalar-valued >> It occurs in the very end ...
3
votes
0answers
66 views

Solving a matrix differential equation using RBFs

Michael Kelly in the paper http://www.mathematica-journal.com/2010/02/evaluation-of-financial-options-using-radial-basis-functions-in-mathematica/, discussed how to apply Mathematica for solving the ...
0
votes
1answer
30 views

Single rows of arrows in VectorPlot [duplicate]

I have two vector fields which have only one component, e.g. the y-component of the graph below. How do I obtain a plot similar to the one uploaded here, by using ...
0
votes
0answers
18 views

The command SocialMediaData still returns a blank plot [duplicate]

I have Mathematica 10.3.1 in Mac OS, and the command SocialMetaData is not working, returning a blank plot. I have seen a similar question from Nov 28 '15, but it is still not solved. ...
1
vote
0answers
41 views

Out[ ] cells suddenly begin with newline

This is a "feature" of Mathematica that persists through several versions. What happens: Mathematica experiences some internal hiccup and from then on starts every Out[ ] cell with a newline, which is ...
0
votes
3answers
89 views

Do loop with If condition

I have the following formulas: 1- A cross section: sigma[beta_,alpha_,Y4_] := c^2/(256*Pi) * (1/2) ( Ytt[beta,alpha,Y4]/ m ) * Abs [A] )^2 Where c is a strong ...
1
vote
1answer
87 views
2
votes
1answer
118 views

Fractal plotting for the Collatz fractal

I have the following equation: f[z_] := 1/4 (2 + 7 z - (2 + 5 z) Cos[Pi*z]) I want to map this on the imaginary plane such that if it converges under iterations ...
3
votes
0answers
94 views

Tweet high quality images

I'm trying to export images to a twitter account with mathematica and the quality of the images is rather disappointing. Here are the others in case you want to see it in the wild: here This is ...
0
votes
0answers
15 views

Finding Y for a Data Set with Std Deviation and Z Score [migrated]

While only 15% of babies have learned to walk by the age of 8 months, 90% are walking by 13 months of age. If the age at which babies develop the ability to walk can be described by a normal model, ...
0
votes
0answers
26 views

Compute score for a set of data [closed]

So let's explain my problem. I have a set of items which have a score from 0 to 100. This set is dynamic which means that several values are expected to be added from moment to moment. In each item is ...
2
votes
2answers
42 views

NIntegrate::inumri error with continuous function

I'm trying to calculate the finite part of a divergent integral numerically, but as I bring the regulator down to $0$, Mathematica starts throwing an error. ...
0
votes
0answers
22 views

Factorising polynomials in Z[i] over Z[i] [closed]

I know that you can use the 'factor' command to factorise polynomials with real coefficients over the Gaussian Integers doing something like this: ...
0
votes
0answers
30 views

Find the variables in a set of linear equations [closed]

Suppose I have a set of linear polynomials with integer coefficients, how could I extract the list of variables? Say given the following ...
2
votes
2answers
86 views

CoefficientList for exponentials terms

I have a long expression with exponentials of variable t1. I need to create a list of the coefficients for each exponential. The problem seems to be that several ...
12
votes
3answers
210 views

Exclude overlapping lists while keeping disjoint- and sub-lists?

Consider a function f[l1_List,l2_List] which is given lists of integers. Whenever two of the lists contain completely disjoint sets of integers OR one of the lists ...
0
votes
1answer
48 views

Intercept in the ARProcess

In the ARProcess help file I don't understand whether an intercept is included or not. How would I add one? I am using version 9 of Mathematica.
1
vote
1answer
34 views

Frame plot axis labels: superscripts and subscripts in italic and non-italic

I want to make nice plot labels with framed plot. I need to have labels with both subscripts and superscripts, both of which need to contain italic and non-italic characters. For example $a_{b, ...
3
votes
1answer
54 views

Looking for a convenient way to replace a large data sample with an analytic approximation

Suppose that data is a large data sample, and that Histogram[data] produces a very smooth-looking distribution. Since ...
0
votes
0answers
37 views

NMinimize to Optimize Parameters for Quarter Car Model

I am very new to Mathematica and am trying to simulate a mountain bike suspension by using a quarter-car model and I have input a displacement vs time road profile for two bumps for the excitation. ...
-2
votes
0answers
25 views

How to express the power series in term of function? [closed]

If S^n is differential operator defined as follows S^0 f(z) =f(z) S^1 f(z) =z f'(z) S^2 f(z) =z (S^1 f(z))' . . . S^n f(z)= z (s^{n-1}) Consider the function ...
7
votes
1answer
115 views

What kind of pattern should I use with StringCases?

Consider the string str = "ABCaDEFbcABCdefDEF" I'd like to take out all substrings surrounded by the substrings "ABC" and ...
0
votes
0answers
61 views

What code can I use to calculate, integrate, and visualize the electric field for an arbitrary shape? [duplicate]

I'm looking for a Mathematica program/function with which I'd be able to specify two objects in 3D space, each at a different surface potential, and then the program would calculate (using Finite ...
5
votes
1answer
61 views

What's up with PauliMatrix with a string argument?

Looking at the definition of PauliMatrix (not the documentation), I realized that it is defined for arguments 0, ...
4
votes
2answers
126 views

Select non-zero elements [duplicate]

I have a function that generates a list of numbers and variables . e.g. F[w]= {wx, wy, 5, 0} I want to select all non-zero elements i.e. ...
0
votes
0answers
54 views

Add color bar in SphericalPlot3d in version 8

I want to add a color bar in my spherical plot. I have tried the BarLegend command in version 8 but it seems not working. Could anyone help me out a bit? I wrote ...
3
votes
1answer
73 views

Table with programmatically specified number of iterators in Compile

Compare two ways of computing a table of values of a multivariable Gaussian: ...
1
vote
0answers
28 views

*Form is not working in script

I want to generate code with a script. But functions as CForm, FortranForm and TeXForm does ...
4
votes
1answer
33 views

How to test if a GeoPosition is inside a geographic Polygon?

I have tried the following: ...
1
vote
0answers
19 views

Mathematica closes after initerlising internal preferences [closed]

I have just installed Mathematica, and when I try to open it it closes after internalising internal preferences. I use mathematica 10.4 on Ubuntu 14.04

15 30 50 per page