How can I fix this problem
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Leonardus Risky
am 17 Mai 2018
Kommentiert: Torsten
am 17 Mai 2018
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 Kommentare
Akzeptierte Antwort
Torsten
am 17 Mai 2018
for i = 1:numel(C)
F = [A, B, C(i), D, E];
G{i} = roots(F);
end
Best wishes
Torsten.
4 Kommentare
Torsten
am 17 Mai 2018
%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))
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu DTMF finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!