フィルターのクリア

Matlab says continue entering statements. I don't know what's wrong.

21 ビュー (過去 30 日間)
MatlabGirl
MatlabGirl 2014 年 3 月 27 日
コメント済み: Sojeong PAK 2024 年 5 月 6 日
Hi.
This is my code:
k = [67.25;
205.25;
223.25;
319.25;
325.25]
nk = 5;
cso = zeros(5,4);
m=-1;
%%For channel subtraction from each other
for i = 1:nk
for j = 1:nk-1
cso(i,j)= k(1,1)- k(j+1,1)
if j==5
kShift = circshift(k,m)
m=m-1;
end
end
I don't know why matlab freezes. What I want this code to do is to subtract all elements from the first element. Then I shift the vector and do it all over again.
Can someone please point my mistake.
Thank you.

採用された回答

Chandrasekhar
Chandrasekhar 2014 年 3 月 27 日
編集済み: Chandrasekhar 2014 年 3 月 27 日
There should be one more 'end' at the last for closing the for loop
clc
k = [67.25; 205.25; 223.25; 319.25; 325.25];
nk = 5;
cso = zeros(5,4);
m=-1;
%%For channel subtraction from each other
for i = 1:nk
for j = 1:nk-1
cso(i,j)= k(1,1)- k(j+1,1)
if j==5
kShift = circshift(k,m)
m=m-1;
end
end
end
  2 件のコメント
MatlabGirl
MatlabGirl 2014 年 3 月 27 日
omg .. yes .. silly me.. THANK YOU!
Sojeong PAK
Sojeong PAK 2024 年 5 月 6 日
Oh thanks! It also works for me, too.

サインインしてコメントする。

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by