A = grainsNoInd.boundary('Indexed','Indexed').segLength;
B= grainsNoInd.boundary('Indexed','NotIndexed').segLength;
%% Excluding grains with a certain percentage of indexed/notindexed boundary length
for i = 1:length(grains('indexed'))
gbfrac(i)= sum(grains(i,'indexed').boundary('indexed','indexed').segLength)./ ...
sum(grains(i,'indexed').boundary.segLength);
end
grains = grains('Indexed');
toRemove = grains(gbfrac<0.22);
grains(gbfrac<0.22)= [];
clear toRemove
clear i
Hi,
have a look here for a start: https://groups.google.com/forum/#!topic/mtexmail/KJvA1d0KV88
Cheers,
Rüdiger
> On 29 May 2019, at 10:26 AM, Sören T <soeren...@gmx.de> wrote:
>
> Hello,
>
> For grain calculations I want to exclude all the Indexed grains with have a high share of grain boundaries touching the not Indexed area.
>
> I have problems to create a grain specific value which tells me the share of the grain boundary length (Indexed,Indexed) to grain boundary length (Indexed,notIndexed).
>
> So far I tried to get it with segLength but the matrix dimensions A and B vary of course in regard to each other and also in regard to the grain.id matrix
>
> A = grainsNoInd.boundary('Indexed','Indexed').segLength;
>
> B= grainsNoInd.boundary('Indexed','NotIndexed').segLength;
>
>
> Somehow I need to get a matrix with one value for "length of (Indexed,Indexed)/(Indexed,notIndexed) grain boundaries" combined with the grainId
>
> a working code somehow like
>
> "[grainsNoInd.id grainsNoInd.boundary('Indexed','Indexed').segLength]"
>
> Has someone an idea?
>
> --
> If you want to reduce the number of emails you get through this forum login to https://groups.google.com/forum/?fromgroups=#!forum/mtexmail, click "My membership" and select "Don't send me email updates". You can still get emails on selected topics by staring them.
> ---
> You received this message because you are subscribed to the Google Groups "MTEX" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to mtex...@googlegroups.com.