will creating a variable map(i,j) = {array} (this is inside two for loops) create a variable that has i locations with unique locations j inside i?
4 次查看(过去 30 天)
显示 更早的评论
1 for i = 100:100:500
2 A = load('data_i', 'gotcha');
3 B = load(data_i+100, 'gotcha');
4 gotcha1 = A.gotcha;
5 gotcha2 = B.gotcha;
6 length = size(unique(gotcha1)) - 1;
7 for j = 1:length
8 map(i/100,j) = {unique(gotcha2(gotcha1 == j))};
9 end
10 end
In line 8 will this varible create basically a dictionary inside a dictionary?
4 个评论
Walter Roberson
2020-7-22
thisfile = sprintf('load_%d.mat', i);
nextfile = sprintf('load_%d.mat', i+100);
A = load(thisfile, 'gotcha');
B = load(nextfile, 'gotcha');
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!