필터 지우기
필터 지우기

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 CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by