kvalue=zer​os(size(da​ta,1),size​(data,1),s​ize(data,2​));

2 ビュー (過去 30 日間)
mina
mina 2013 年 3 月 2 日
i have following codes for compute of kernel foe fuzzy cmeans based on kernel or kfc :
function kvalue=compute_kvalue(data)
v=6.1;
var = (max(data)-min(data)).^2/v;
kvalue=zeros(size(data,1),size(data,1),size(data,2));
for i=1:size(data,1)
for j=i:size(data,1)
kvalue(i,j,:)=exp(-abs(data(i,:)-data(j,:)).^2./var);
kvalue(j,i,:)=kvalue(i,j,:);
end
end
end
line 4 ,what means?

採用された回答

Wayne King
Wayne King 2013 年 3 月 2 日
編集済み: Wayne King 2013 年 3 月 2 日
kvalue=zeros(size(data,1),size(data,1),size(data,2));
The above line is just initializing an array of zeros that has dimensions MxMxN where M is the number of rows in data and N is the number of columns.
So that,
data = randn(8,4);
kvalue=zeros(size(data,1),size(data,1),size(data,2));
kvalue is a matrix of zeros that is 8x8x4. The matrix of zeros is then filled with values in the following for loop.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFilter Design についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by