cyrille.piatecki
  • Member for 5 years, 10 months
  • Last seen more than a month ago
Creating an image of a discrete dynamical system
7 votes

I hope this Clear[A, pts1, pts2, pts] A = {{.80, 0}, {0, .64}}; pts1 = Table[NestList[A.# &, {k, 3}, 20], {k, -3, 3}]; pts2 = Table[NestList[A.# &, {k, -3}, 20], {k, -3, 3}]; p1 = ...

View answer
Create a command that centers output in its cell
Accepted answer
6 votes

I think that what I was expecting is this centering := CellPrint[ExpressionCell[#, "Output", TextAlignment -> Center]] & and Plot[x^2,{i, 1, 10}]// centering

View answer
How do I type the independence symbol in Mathematica?
Accepted answer
5 votes

Since there does not seem to have a [UpTee] here is a ugly solution ut = Row[{Rotate[Style["\[DoubleRightTee]", 20, Bold], 120.95]}]; Row[{Style["x "], Style[ut] , Style[" y"]}] Hope it will be ...

View answer
How to get the set of solutions of linear systems of inequations in Mathematica?
Accepted answer
5 votes

Mathematica say to use reduce so use Reduce instead Reduce[y < -3 + 2 x && y >= 1 - x]

View answer
Plotting Phase Diagram
Accepted answer
5 votes

I am badly placed to critic you question since I use to be as criptic as you. First only an economist can understand your objective since this representation is not so standard as you think. I have ...

View answer
How to efficiently input matrices in Mathematica (compared to what MATLAB offers)
4 votes

Suppose the number of data are a multiple of 4. This is a simple way m = HoldForm[{1 2 3 4, 5 6 7 8, 9 10 11 12}] /. a_ b_ c_ d_ -> {a, b, c, d} Try m//MatrixForm this doesn't work since ...

View answer
Finding optimal taxation policy- constrained optimization
4 votes

This is the easiest way to solve the individual problem obj := p Log[c] + Log[d] + Log[l] constraint := (1 - t) w (1 - l) + T - c - (1 + τ) d log = obj - λ constraint grad = Grad[log, {c, d, l, λ}] ...

View answer
Using Select in Subsets
4 votes

In your case you can eliminate simply the duplicate by DeleteDuplicates[list[[1]]] but you perhaps this may be a part of a huge procedure and you do not know which numbers are duplicates. This is ...

View answer
Getting error message when integrating a simple piecewise function
4 votes

Ok it may be strange to put an assumption on t but this A[1][t_] = Piecewise[{{1 - 2*t, 0 <= t <= 1/2}}, 0] Assuming[0 <= t <= 1, Integrate[A[1][x], {x, 0, t}]] works

View answer
Creating a diagram
Accepted answer
4 votes

Inspiring by an old question I asked, here is a possible way to encode your graph ClearAll[esF] esF[setback_: .2, as_: .1] := {Arrowheads[as], Arrow[GraphElementData[{"CurvedArc", "Curvature"...

View answer
Plot function with different parameters' values
4 votes

Since I must leave and I have no response, I set a very simple example: f[x_,theta_] := Sin[x^2]/(2 - theta) Plot[Thread[f[x, Range[0, 1.5`, 0.05]]], {x, 0, 3}] Obviously, this question is a ...

View answer
How to integrate with integer parameter in Mathematica?
Accepted answer
4 votes

Here is a simple answer Define k[n] as a listable function : SetAttributes[k, Listable] k[n_] := \!\( \*SubsuperscriptBox[\(\[Integral]\), \(3\), \(10\)]\( \*FractionBox[\(1 + Cos[f\ \((1 + 2\ n\ ...

View answer
Symbolic Non-Linear Maximization using Lagrangian
Accepted answer
3 votes

As a beginner and certainly an economist you should be aware of two points : -- in Mathematica you should avoid capital letters as variable because capital letters are for build-in commands. And pay ...

View answer
How can I draw a block diagram of a certain kind?
Accepted answer
3 votes

Could this be satisfacing ? Graph[{1 -> 2, 1 -> 3, 1 -> 4, 2 -> 5, 3 -> 5, 3 -> 6, 4 -> 6, 5 -> 7, 6 -> 7}, VertexCoordinates -> {{0, 1}, {1.1, 2}, {1, 1}, {1, 0}, {...

View answer
How to use a function definition in another function
3 votes

Try this f = Sin[#] & der = D[#, x] & der[f[x]] or this der[f_[x]] = d[f[x], x] l[x_] = a x + b x^2 der[l[x]] Normally your definition should works --- it works on my computer. Restart the ...

View answer
Why wont Mathematica plot my two functions on the same graph?
Accepted answer
3 votes

Plot[{50 p - 600, -25 p + 1200}, {p, -10, 10}, PlotLegends -> Placed["Expressions", Below]] or Plot[{50 p - 600, -25 p + 1200}, {p, -10, 10}, PlotLegends -> Placed[{"f1", "g1"}, Below]]

View answer
How do I reshape an array of data into an array of matrices of data?
3 votes

Sorry, I will not give explanation because I am in hurry m = Table[Subscript[a, i, j], {i, 1, 4}, {j, 1, 4}] m // MatrixForm Flatten[m] l = Partition[m, {2, 2}] l // MatrixForm In the same ...

View answer
How to do matrix operation if the first matrix is an operator?
Accepted answer
3 votes

Your operation does not work because in this case it is not a matricial multiplication but a composition. Try mM = {{D[#, x] &, D[#, y] &}, {D[#, y] &, D[#, z] &}} v = {f[x, y, z], ...

View answer
Manipulate with discrete values
2 votes

Manipulate[ Plot[a + b*x, {x, 1, 100}], {a, -1, 10, 1}, {b, -10, 10, 1}]

View answer
How to solve the differential equation of the form $x\ dx=y\ dy$?
2 votes

The MMM answer is the simplest but remember how in textbooks they show how to solve an exact differential equation : Solve[\!\( \*SubsuperscriptBox[\(∫\), \(a\), \(x\)]\(s \[DifferentialD]s\)\) == \!\...

View answer
Differentiation problem
2 votes

There is always many way to arrive to the same solution. As the last commer I give the doc way --- have a look to http://reference.wolfram.com/language/tutorial/Differentiation.html S10 = x^2 E^(a y -...

View answer
Maximum Likelihood estimation
2 votes

Here is an other approach but still with bad results --- I have looked some years ago to the estimation of this kind of sde and I think it is normal step := 0.01 tt := 120 data = RandomFunction[ ...

View answer
Defining a function that detects square matrices
Accepted answer
2 votes

The only problem is that for a $ n \times 1$ matrix, Dimensions may b a singleton so g = If[MatrixQ[#] && Length[Dimensions[#]] == 2 && Dimensions[#][[1]] == Dimensions[#][[2]], ...

View answer
Remove rows in table that have rows with missing values
2 votes

Perhaps simply this t=Table[{If[i == 1, Missing[NotApplicable], i], j}, {i, 1, 2}, {j, 1, 2}] Drop[t, 1, None] // TableForm

View answer
Taxi Cab problem - Loops
2 votes

I hope this will be the expected answer Clear[taxicab, x1, x2, y1, y2]; taxicab[{{x1_, y1_}, {x2_, y2_}}] := Abs[(x2 - x1)] + Abs[(y2 - y1)]; taxicab[{{2, 3}, {1, 4}}] l = {{0, 0}, {1, 0}, {1, 1},...

View answer
How to add the picture to graph without overlapping?
2 votes

First, of all people in MSE need data and/or code to try to help you. So be always aware to ask a question with gives the minimum effort to the one who will try to answer --- I have use an image ...

View answer
I try to plot f(x) and g(x) on the same axis, but the plot is blank. What am I doing wrong?
2 votes

I am OK with Chuy but the best thing is to look at code f[x_] := Sin[2 x] g[x_] := 2*Sin[x] Plot[{f[x], g[x]}, {x, -1, 1}] every command in mathematica begins with an uppercase. Forget ( for the ...

View answer
system of differential equations 3 DSolve
2 votes

Unfortunately, you have not documented the values of the parameters. As for the Lorentz 3D equation, there is no closed form solution. Here is the simple code for which you asked --- obviously, your ...

View answer
How to merge two plots in Mathematica 8.0 in a column and then save the figure as a single pdf file?
Accepted answer
2 votes

Here is a kick --- sunday --- answer p1 := Plot[Sin[x], {x, 0, 1}] p2 := Plot[Cos[x], {x, 0, 1}] GraphicsGrid[{{p1}, {p2}}] Export["Where you want\\name of the file", pasted GraphicsGrid] You ...

View answer
Arithmetic Progression
2 votes

If I understand your question, there is no need of Mathematica to solve your problem for $x_0$ given, we know that $y_{n+1} = y_{n} + 5$. We know also that $y_0 y_1 = 12500$. That is to say that $y_0 ...

View answer