Matlab unique function -


I am struggling to determine the probability of the occurrence of unique elements in the thresh_strain matrix (below as the form of 100 x Can be seen in 16). I was trying to use the code given below to do this, but I get the same probability of the event related to each element, while I want the possibility of an event related to unique elements in thresh_strain.

  function [thresh_strain] = MCsolution () no_iterations = 100; Thresh_strain = zero (100, 16); Casechoice = input ('1 for first layout and 2 for second layout:'); For I = 1: no_iterations for Jammu = 1: 16 J = Nielsen (casechoice); Thresh_strain (I, h) = J (1, j); End end% [exclusive value, ~, unique idex] = unique (thresh_strain); % Frequency = deposit (uniqueindex (:), 1) ./ numel (thresh_strain);   

thanks

This title is not really clear and Description, but I think you can find something like this:

  myUniqueValues ​​= unique (myMatrix); Nelements = Hist (myMatrix (:), myUniqueValues); % Plots (myUniqueValues, nelements)   

How many times each unique value is calculated, it is trivial to obtain a percentage related here.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -