selecting elements from union of multiple sets, (edited again , need immediately )

I am editing it again to elaborate my problem...code given below gives sets which are 'H', 'RE', 'LE' and 'SH' , 'LN' and 'RN'......now i need a set of elements of 'errors' that exist B/W [(LN, LM )U(RM, RN)] ...here 'errors' must be between LN(excluding) and LM(excluding), and similarly between RM(excluding) and RN(excluding) and there's union....
LM = 0;
RM = 1;
for i=1:size(errors, 1)
for j=1:size(errors, 2)
if (errors(i, j)== LM) % Errors equal to LM
H(Hindex)=errors(i,j);
Hindex=Hindex+1;
if (errors(i, j) < LM) % Errors less than LM
LE(LEindex)=errors(i,j);
LEindex=LEindex+1;
elseif (errors(i, j)== RM) % Errors equal to RM
SH(SHindex)=errors(i,j);
SHindex=SHindex+1;
elseif (errors(i, j)> RM) % Errors greater than RM
RE(REindex)=errors(i, j);
REindex=REindex+1;
else EX(EXindex)=errors(i, j); % Remaining Errors
EXindex=EXindex+1;
end
end
end
%%selecting minimum occurrence of numbers LN and RN from histrogram of LE and RE respectively
% MINIMUMS OF LE
uniqueLX = unique(LE);
L_elements = hist(LE, uniqueLX);
min_count_of_each_LE = min(L_elements);
index_to_all_min=(L_elements == min_count_of_each_LE);
LN = uniqueLX(index_to_all_min);
%MINIMUMS OF RE
uniqueRX=unique(RE);
R_elements = hist(RE, uniqueRX);
min_count_of_each_RE = min(R_elements);
index_to_all_minRE=(R_elements == min_count_of_each_RE);
RN = uniqueRX(index_to_all_minRE);

8 Comments

Have you tried this homework yourself? If have gotten started, please post some code showing what you have attempted, and where you are getting stuck. Then we can help you move forward.
If you don't even know how to get started, then I suggest you approach your professor and tell him/her that you don't even know how to get started. Then maybe you can discuss what extra help you need in the class.
Why did you delete your other question on the same topic, only to ask it again? You were given some help there, but how can anyone know why the help was not enough if instead of interacting with people you just delete the question and start over?
I thought, i couldn't convey my question in a write way ... thats way i edit it and asked again... i didn't do that for taking help from someone else...
yup you are true,,, i shouldn't delete that from blog
now i need set of elements of'errors" which are neither in 'LN' nor in 'LM' but from LN-to-LM ... here 'LN' is minimum occurrence of -ve numbers and LM is maximum which is '0' in this case...right! and same from RM(second max=1) to min occurrence of numbers RN(+ve no's)....
expression is {'errors' belong to (LN, LM)U(RM, RN)}...em stuck here in writing code of finding these subset of "errors"
And what is errors? Post a question!!
Note: Talat had multiple threads going on topics and did not clearly indicate whether previous problems had been solved or not. This particular thread showed up as new again because I edited it to improve the formatting and grammar.

Answers (0)

This question is closed.

Asked:

on 3 Apr 2011

Closed:

on 3 Jan 2017

Community Treasure Hunt

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

Start Hunting!