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 views (last 30 days)
Show older comments
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 Comments
Walter Roberson
on 22 Jul 2020
thisfile = sprintf('load_%d.mat', i);
nextfile = sprintf('load_%d.mat', i+100);
A = load(thisfile, 'gotcha');
B = load(nextfile, 'gotcha');
Answers (0)
See Also
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!