I am running some codes and getting too much outputs in the workspace, and that is confusing especially when you have a series of functions. So is there a way to reduce their number?
a=[2 3; 6 2; 4 1];[m n] = size(a);n = m;Dist = zeros(m, n);for i = 1 : m for j = 1 : n Dist(i, j) = sqrt((a(i, 1) - a(j, 1)) ^ 2 + ... (a(i, 2) - a(j, 2)) ^ 2);end endDist
For example running this code, how can I get just 'a' and 'Dist' in workspace?
Best Answer