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
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 CenterFile Exchange 中查找有关 Image Processing Toolbox 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by