wK = w0(:);
古いコメントを表示
What does this code mean? wK = w0(:);
wk = w0(:);
y = zeros(N,1);
e = zeros(N,1);
W = wk;
for i = 1:N,
uvi = [u(i+1) u(i)]';
y(i) = wk'*uvi;
e(i) = d(i) - y(i);
w_new = wk + (mu*e(i))*uvi;
wk = w_new;
W = [W wk];
回答 (1 件)
madhan ravi
2019 年 3 月 26 日
0 投票
https://in.mathworks.com/help/matlab/ref/colon.html - (:) forces a matrix or a row vector as a column vector
5 件のコメント
madhan ravi
2019 年 3 月 26 日
Examples:
>> A
A =
1 2 3
4 5 6
7 8 9
>> A(:)
ans =
1
4
7
2
5
8
3
6
9
>> B = 1:9
B =
1 2 3 4 5 6 7 8 9
>> B(:)
ans =
1
2
3
4
5
6
7
8
9
>>
Hojin Lim
2019 年 3 月 26 日
madhan ravi
2019 年 3 月 26 日
編集済み: madhan ravi
2019 年 3 月 26 日
First of all you you didn't provide any values to us so your question is vague.
"gives me an error."
Post the complete error message, everything in red.
Hojin Lim
2019 年 3 月 26 日
編集済み: madhan ravi
2019 年 3 月 26 日
madhan ravi
2019 年 3 月 26 日
w0 is not defined!
カテゴリ
ヘルプ センター および File Exchange で Statistics and Machine Learning Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!