Can someone help with this?

1 次查看(过去 30 天)
Hi I need help plotting the resopnse to this differential equation with 10^4 points. thanks if you can help.
!x!+ cx! + kx + εx3 = Bcost
0 c ≤ 0.5, 1 k ≤1, 0 ≤ ε ≤1, B = 8.5 ignore the exclamation points.
  3 个评论
Victor
Victor 2013-12-17
the form you wrote it in is correct it is ε*x^3.
Walter Roberson
Walter Roberson 2013-12-17
Is it correct then that the equation is
(1 + c + k) * x + ε*x^3 = B*cost
? If so then what do you mean by "response"? This is not an differential equation.

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2013-12-17
The equation
(1 + c + k) * x + ε*x^3 = B*cost
can be solved using roots()
roots([epsilon, 0, (1 + c + k), -B*cost])
You then have a plot with three independent variables, c, k, epsilon, together with 3 results per location; 0, 1, or 3 of the results will be real-valued. Plotting this will require a 4 dimensional plot: 3 axes plus 1 result. You need to decide how you want to represent the 4th dimension: options include "color", "marker size", and "transparency".
On the other hand, (c+k) is linear, and the only information that it gives beyond the range (min(c)+min(k)) to (max(c)+max(k)) is in the density of the points. So you might as well drop down a dimension in the plotting
N = 100;
[EPSILON, CK1] = ndgrid(linspace(0,1,N), linspace(1 + 0 + -1, 1 + 1/2 + 1, N));
X = roots([EPSILON, 0, CK1, -B*cost]);
surf(EPSILON, CK1, X(:,:,1)); same for (:,:,2) and (:,:,3) for the three different X values
or something similar (I have not checked the exact dimensions that X will come out as)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Stability Analysis 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by