Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Subscript Indices Error Prompt

1 回表示 (過去 30 日間)
Jacob Hammer
Jacob Hammer 2018 年 4 月 24 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I am receiving this error code. Please help. I am attempting to plot a feedback response system.

回答 (1 件)

KSSV
KSSV 2018 年 4 月 24 日
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 件のコメント
Jacob Hammer
Jacob Hammer 2018 年 4 月 24 日

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 2018 年 4 月 24 日
C(T,:)= your expression

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by