필터 지우기
필터 지우기

Can someone help with this?

조회 수: 1 (최근 30일)
Victor
Victor 2013년 12월 17일
답변: Walter Roberson 2013년 12월 17일
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에서 Graphics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by