Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Subscript Indices Error Prompt

1 Ansicht (letzte 30 Tage)
Jacob Hammer
Jacob Hammer am 24 Apr. 2018
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
I am receiving this error code. Please help. I am attempting to plot a feedback response system.

Antworten (1)

KSSV
KSSV am 24 Apr. 2018
c(t) is wrong. Because t will be having zeros, and it cannot be used as indices. Use.
C{T} = your expression.
Note: From next time, please don't attach code as image snippet. Copy and paste the code.
  3 Kommentare
Jacob Hammer
Jacob Hammer am 24 Apr. 2018

also this is the actual code:

% Must plot c(t) vs t for set values for Z and W_n

% Z = 0.1

% W_n = 2.5 rad/s

for T = 1

t = linspace(0*T,3600*T,360000);

    c = zeros(1,360000);

Z = 0.1;

W_n = 2.5;

B = sqrt(1 - Z^2);

Theta = atan(B/Z);

c{t} = 1 - ((1/B) .* (exp(1) .^(-Z * W_n .* t)) .* (sin(B .* W_n .* t + Theta)));

end

KSSV
KSSV am 24 Apr. 2018
C(T,:)= your expression

Diese Frage ist geschlossen.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by