필터 지우기
필터 지우기

How can I fix this problem

조회 수: 2 (최근 30일)
Leonardus Risky
Leonardus Risky 2018년 5월 17일
댓글: Torsten 2018년 5월 17일
Hi everyone, can anyone help me about this program I'm newbie to matlab. I need to plot variable X vs I but when i run this, my matlab gone error and closed. Thank You.
  댓글 수: 2
KSSV
KSSV 2018년 5월 17일
편집: KSSV 2018년 5월 17일
What are you trying to do? You are trying to find roots for the polynomial of degree 12004..... :|
Leonardus Risky
Leonardus Risky 2018년 5월 17일
No, i need to find the roots of every function F, and the function F is depend on X is a range from 0 to 12000 and the other variable is constant. i need find every roots when I change the X so it find new roots of F. and plot only the imaginary roots Vs X. Thank You

댓글을 달려면 로그인하십시오.

채택된 답변

Torsten
Torsten 2018년 5월 17일
for i = 1:numel(C)
F = [A, B, C(i), D, E];
G{i} = roots(F);
end
Best wishes
Torsten.
  댓글 수: 4
Leonardus Risky
Leonardus Risky 2018년 5월 17일
편집: Leonardus Risky 2018년 5월 17일
i need to take only the imaginary parts every roots for every X variable Vs X (spin speed). so the plot is there will be 4 line of the imaginary parts in the y-axis and x-axis is variable X (spin speed). if you check very detail there will be only 2 imaginary number for every roots
Torsten
Torsten 2018년 5월 17일
%data
m = 14.29;
a = 2.871;
k1 = 1.345*10^6;
k2 = 1.570*10^6;
%damping Coeff
b = 0.0002;
c1 = b*1.5*10^5;
c2 = b*3.75*10^5;
%spin speed
X = 0:1:12000;
x = X.*(pi/30);
%car eq
A = m^2;
B = m*(c1+c2);
C = (k1.*m)+(k2.*m)+(c1.*c2)+((a.^2).*(x.^2));
D = (k2*c1)+(k1*c2);
E = k1*k2;
for i = 1:numel(C)
F = [A, B, C(i), D, E];
G = roots(F);
H = abs(imag(G));
I(i,:) = H(:)/(2*pi);
end
plot(X,I(:,1),X,I(:,2),X,I(:,3),X,I(:,4))

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Test and Measurement에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by