How to run cell array from 1 to max_iter?
Ältere Kommentare anzeigen
max_iter = 100
V_cell = cell(max_iter, 1);
V_cell{1} = V;
for i = 1:max_iter
nrow = size(data,1);
nbar = size(V_cell{i}, 1);
out = zeros(nbar, nrow);
for k = 1:nbar
out(k,:) = sqrt(sum(((data-ones(size(data, 1), 1)*V_cell{i}(k,:)).^2), 2));
end
dist = out; % fill the distance matrix
I've done this, but the result dist contains all NaN, can you give me some solution? Thanks.
Antworten (1)
Hiro Yoshino
am 9 Dez. 2019
0 Stimmen
Remember:
cell(1) --> 1st cell as a cell-type
cell{1} --> the content of the 1st cell as a number, string, ... whatever
1 Kommentar
Day7
am 27 Dez. 2019
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!