Finding a vector with a table
2 views (last 30 days)
Show older comments
Hi,
I have a table:
23x4 double 56.3507527250652 'BRANCH'
13x4 double 64.3500399298111 'BRANCH'
19x4 double 92.8117570643396 'BRANCH'
32x4 double 115.752266229064 'BRANCH'
4x4 double 27.1259128701332 'BRANCH'
132x4 double 359.891498931659 'BRANCH'
6x4 double 34.5092311768868 'BRANCH'
31x4 double 83.1975489342949 'BRANCH'
47x4 double 136.221229624204 'BRANCH'
37x4 double 63.5355126390744 'BRANCH'
I want to extract data from the first column, each column is ordered like this, think of it as x,y,z,d:
46.6495524000000 47.8684800000000 17.3488650000000 2.59074640000000
45.2452924000000 47.7032600000000 17.0319650000000 2.31435600000000
43.8410324000000 47.5382600000000 16.7151150000000 2.03796120000000
42.4367724000000 47.3732600000000 16.3982150000000 1.76157080000000
39.3039724000000 46.5128400000000 16.0034650000000 0.796791600000000
37.4286924000000 45.4902800000000 14.9268150000000 0.729537600000000
I want to find the values which are identical to other values extracted from the set. I have extracted here x,y,z:
48.9702 94.8262 9.3419
47.7602 95.9105 8.7308
corresponding to the first three columns of the first column of the table: x,y,z.
I want to be able to find the position of the values in the table. So far I have come up with this:
y76 = neuron((no_synapses),[3:5]);
y76(:,1) = y76(:,1) * xy_pixel;
y76(:,2) = y76(:,2) * xy_pixel;
y76(:,3) = y76(:,3) * z_stack;
SYNAPSE = cell(size(branches));
for i = 1:length(branches)
for j = 1:length(no_syn)
for k = 1:size(branches{i},1)
SYNAPSE = find([branches{i}(k,1:3) == y76(j,:)])
end
end
end
But haven't had any luck with it. This just appears:
SYNAPSE =
1×0 empty double row vector
Does anyone have any suggestions.
Cheers.
0 Comments
Answers (1)
See Also
Categories
Find more on Tables 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!