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