1
vote
1answer
85 views

Changing default behavior of Series to give slightly different SeriesData

I am working with complicated expressions expr that contains the symbolic function f[x] which I know to have a pole at ...
0
votes
1answer
15 views

NDSolve printing error message NDSolve::ndode

Using NDSolve while solving system of ODE's. Here is my try ...
0
votes
1answer
61 views

Simplifying square root expressions

I have read lots of questions on square root simplification on MMA, but I haven't really seen my problem posted (or understood a clear way to deal with this issue). I am simplifying some expressions ...
9
votes
5answers
381 views

Finding time-series direction reversal of certain magnitude

I'd like to find the points of a time-series that are a certain distance away (in value, not in time) from the previous maximum, which I consider a reversal. For example, for ...
3
votes
4answers
77 views

How can I get a list of the positions of the running minima in a list?

I want the positions of the (sequential) running minima in a list, that is, the positions of entries that have the minimum value of all the elements in that list, up to and including that entry. For ...
0
votes
1answer
22 views

How to use pattern matching for integral identities?

I have an unknown pdf f[x], and I need to express integrals involving f[x] as expansions of the moments of f[x]. For example: ...
6
votes
0answers
61 views

Inconsistent behavior of undocumented Encode->Import->StringToStream->Get on password-locked stream

Let's save a definition. Encode it with password/key and Get it again. We will not use Get ...
3
votes
1answer
45 views
0
votes
1answer
23 views

Elements inside arrays seem to be strings rather than signed numbers

When I have code like b = Array[Subscript[be, #] &, {3, 1}] b = b /. {Subscript[be, k_] :> Subscript[-be, k] /; k > 1} I am noticing that Mathematica ...
1
vote
2answers
33 views

Diagonal minors of matrix

I need to calculate the minor of a matrix. I am going to use Mathematica example here, In[1]:= (mat = Table[i^2 + i j + j^3, {i, 4}, {j, 4}]) // MatrixForm; Minors[mat, 3, Identity] // MatrixForm; ...
1
vote
1answer
74 views

How to find and verify relationships between functions?

MMa gave me a complicated result involving Hypergeometric0F1's. It was much less complicated after I discovered this identity: ...
0
votes
1answer
34 views

How to define a function [on hold]

How can I define a function which depends on a function of x? Something like this f[u[x]_,u[x]']= u[x]' + a [x] u[x] +b[x] I think I wasn't enaugh clear. If I ...
0
votes
0answers
22 views

Deleting rows and columns to get submatrices? [duplicate]

I did not think that this would be difficult to find but how do I drop rows and columns from a full matrix? For example, I would like to delete the last row and first column but have trouble making ...
0
votes
1answer
22 views

Solving linear recursions without constant depth in mathematica

Mathematica does not like this recurrence relation. I do not understand why? ...
2
votes
3answers
111 views

Iterating over a list, in a functional way

I have learned a lot about functional programming just from messing around in Mathematica, but I've come across a problem that I don't know how to solve in a "functional" way. Any help would be ...
10
votes
3answers
1k views

Combining Cos[ ] terms

A function that is the sum of two Cosine terms of the same frequency x[t_] := a1 Cos[w0 t + b1] + a2 Cos[w0 t + b2]; can be simplified to a single ...
2
votes
2answers
79 views

How to change the form $A\cos \omega t + B\sin \omega t$ into the form $\sqrt{A^2+B^2}\cos(\omega t-\phi)$ [duplicate]

I'm preparing notes for teaching next week's class in differential equations. My hand calculation solution of $$y''+192y=0, y(0)=1/6, y'(0)=-1$$ is $$y=\frac16\cos 8\sqrt3 t-\frac{\sqrt3}{24}\sin ...
333
votes
12answers
65k 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 ...
6
votes
2answers
118 views

Color lines by angle

I would like to color some lines according to the following color function: ...
-1
votes
0answers
19 views

How use part on a simple matrix to extract individual elements, not rows or columns [duplicate]

I am mystified by how the function Part works given that I have tried many times to extract simple elements of a matrix. My matrix is ...
0
votes
0answers
7 views

module function giving Null values for the following code(Stiffness Matrix Problem): [on hold]

The module function giving Null values for the following code(Stiffness Matrix Problem): ...
6
votes
1answer
73 views

Strange behavior when setting NumericQ of a symbol

It happens both in v9&v10. If you try this a^0 a^0 (1/a)^(3/2) a^0 (1/a)^(5/2) Mathematica returns 1 (1/a)^(3/2) (1/a)^(5/2) It's trivial. ...
3
votes
1answer
110 views

Series approximation to integral

I would like to approximate the integral $$ \int_0^\infty dy\,\frac{1}{\sqrt{2\pi y\sigma^2}}\exp\left(-\frac{(x-y)^2}{2y\sigma^2}\right)f(y), $$ as a series expansion in the limit $\sigma\rightarrow ...
0
votes
0answers
16 views

Use ParametricNDSolve with Plotting

I am attempting to solve a differential equation of the form $$ \frac{dx}{dt}=ax+by \\ \frac{dy}{dt}=cx $$ with parameters $0<a<1$ and $a,b,c \in \mathbb{R}$. I am able to use NDParametric ...
6
votes
1answer
133 views

Computing launch parameters for hitting a point in 3D with projectile under influence of wind

The end goal of this problem is to compute functions which describe the launch parameters which are needed to hit a specified goal in 3D in the presence of wind disturbances. This is as far I have ...
0
votes
0answers
8 views

Factorial Formula 1∗1!+2∗2!+…+x∗x! = (x+1)!−1 [migrated]

The following relation can be easily proved with the help of Mathematical Induction 1∗1! + 2∗2! + ... + x∗x! = (x+1)!−1 However, for large value of x the result may escalate really quickly. ...
0
votes
0answers
21 views

NDSOlve - 1D wave equation with boundary

I am currently trying to solve the 1D wave equation with Mathematica: $$c^2\frac{\partial u}{\partial x^2}=\frac{\partial u}{\partial t^2}$$ I want to do so for a cantilever with a tip mass: One ...
0
votes
0answers
13 views

How to converrt RGB to YCbCr [duplicate]

While converting rgb to Ycbcr, do we get values as floating point numbers? I would like to have Y, Cb, Cr values as integers. Is it possible?
4
votes
3answers
105 views

Replace elements in matrix to make it symmetric using automated procedure

I am generating a matrix using (mat2 = Array[Subscript[a, ##] &, {4, 4}]) // MatrixForm but would like to force Mathematica to make it symmetric. Thereby I ...
4
votes
1answer
104 views

Is Mathematica's (v10.0.2) NetCDF exporter broken?

I'm trying something very simple, namely: Export["file.nc", {"Datasets" -> {"seqs" -> {"AAA", "BBB"}}}, "Rules"] And getting Java errors about "illegal ...
11
votes
1answer
76 views

Adding Trace produces error messages

This is very strange. As I was trying to debug this problem, I noticed when I add Trace then I get lots of internal errors generated. This also happens the first ...
1
vote
1answer
57 views

Issues with Arrow and Graphics3D [on hold]

I'm trying to plot a simple picture: a plane with a circle in it, and three vectors in the curve. Mathematica keeps saying that the array "has the wrong dimensions for a graphics coordinate list" and ...
1
vote
1answer
66 views

Notebook downloaded from web giving error message

Just bought a copy of E. J. Mcinnerney's textbook Computational Explorations in Magnetron Sputtering. However, when I download and try Chap2.nb from: ...
0
votes
1answer
40 views

How can I round a number up with two decimals? [on hold]

My problem is, that I have to round a number with many decimals to a number with two decimals. For example: The number is 3.467. Now I want to get 3.46. I tried it with Round[3.4647,0.01], but I only ...
2
votes
1answer
136 views

Replacing powers of $n$-th partial sums in the output of a function with $S[i]$ for $i = 1,\ldots,n$

I've written some simple code that, for various $N \geq 1$ and $k = 1,\ldots,N+1$ computes the $n$-th derivative of $\log S_N$ where $S_N(z) = \sum_{k=0}^N \frac{1}{k!}z^k$ as follows: ...
0
votes
0answers
44 views

Nothing showing up on complex contour plot [on hold]

I am trying to graph the following function, where z:=x+y*I z(Conjugate[z]+2)=3. But with my code nothing is showing up. I've tried many different scales so something must be wrong with the actual ...
0
votes
1answer
68 views

Plotting Complex Numbers - Functions of Complex Numbers [duplicate]

So I have to generate a few different plots with z, where z is a complete number... z[x_, y_] := x + y*I F[z_] := (25*Pi*z*I)/(1 + 10*Pi*z*I) First, I need to ...
6
votes
1answer
174 views

How can a function know in which function it was evaluated?

Hello my second question here might be very hard. I am asking for something "magical", if i define a function g and i call it inside a function f, how can g have information about the outer function ...
4
votes
2answers
112 views

Trying to get Arg[1 + I a] -> ArcTan[a]

Can Mathematica evaluate Arg[1+ I a] when a is a positive real in order to get ArcTan[a]? ...
4
votes
1answer
52 views

Problem with Simplify, Sqrt, and Set: What's going on?

I am having some trouble getting Mathematica to simplify an expression of the form Sqrt[x]*Sqrt[1/x], where x>0. The problem is that x is assigned to some complicated form by the time Mathematica ...
2
votes
3answers
165 views

Function to calculate average of multiple lists

I have several lists of experimental data f[x] with different intervals Δx including some noise. ...
0
votes
1answer
45 views

Unintended effect of closing square bracket on Spanish keyboard in Mathematica online

I have only just started using Mathematica Online and I have encountered a problem already with the ubiquitous closing square bracket ] using a Spanish key board. I ...
0
votes
2answers
94 views

Random geometrical graph generation

I would like to generate a random graph on $[0,1]^2$. Each node is connected to one other if the distance between two nodes is say 1/4 or less. Here is an example with 50 nodes and 200 edges I would ...
1
vote
0answers
86 views

How to find soccer balls in an image? [on hold]

I have 10k images and I need automatically remove only soccer balls, excluding other types (volleyballs, baseballs, etc...). I'd like to use computer vision methods of V10 to find their masks and ...
1
vote
1answer
38 views

Problem with converting \frac into mathematica output [duplicate]

Please help me with the following problem: TeXForm[2/3] The Answer is correct: "\frac{2}{3}" I don't understand why ...
0
votes
1answer
23 views

WSMModelData[] can not find my model

I have something like this in my notebook (SystemModeler is not running): ...
6
votes
0answers
50 views

Why can't I abort main evaluation from ScheduledTasks (Service Link)?

FrontEndExecute[FrontEndToken["EvaluatorAbort"]] is equivalent of the menu item: Evaluation >> Abort. It works with ...
0
votes
1answer
51 views

How to plot and visualize a single linear vector in 3D? [on hold]

I have a vector (in physic) designated as F1=250cos(60)i+250cos(60)j+250cos(45)k, and i would like to see it in a 3D graphic with the axis centered at the origin, after what i would include other ...
0
votes
1answer
19 views

Size of the box using Manipulate function

I am using the following command: Manipulate[Graphics[Arrow[{{0, 0}, {a Cos[ω t], a Sin[ω t]}}]], {t, 0, 10, 0.1}] In order to display a vector in circular ...

15 30 50 per page