MATLAB: How to search row and delete row

arrayMATLABoptimization

x= [15 30 45 60 -45 -30 0 90 15 30 45 60 -45 -30 0 90 15 45 60 -45 -30 0];%Initial guess
a = unique(x); % unique elements
y = repmat(x,numel(a),1);%repeat x matrix
y(:,end) = a'; %replace last column by transpose(a)
%output
y= [15 30 45 60 -45 -30 0 90 15 30 45 60 -45 -30 0 90 15 45 60 -45 -30 -45;
15 30 45 60 -45 -30 0 90 15 30 45 60 -45 -30 0 90 15 45 60 -45 -30 -30;
15 30 45 60 -45 -30 0 90 15 30 45 60 -45 -30 0 90 15 45 60 -45 -30 0;
15 30 45 60 -45 -30 0 90 15 30 45 60 -45 -30 0 90 15 45 60 -45 -30 15;
15 30 45 60 -45 -30 0 90 15 30 45 60 -45 -30 0 90 15 45 60 -45 -30 30;
15 30 45 60 -45 -30 0 90 15 30 45 60 -45 -30 0 90 15 45 60 -45 -30 45;
15 30 45 60 -45 -30 0 90 15 30 45 60 -45 -30 0 90 15 45 60 -45 -30 60;
15 30 45 60 -45 -30 0 90 15 30 45 60 -45 -30 0 90 15 45 60 -45 -30 90;];
I want to delete row which matching with "x" and store it into "value".
value = [15 30 45 60 -45 -30 0 90 15 30 45 60 -45 -30 0 90 15 45 60 -45 -30 -45;
15 30 45 60 -45 -30 0 90 15 30 45 60 -45 -30 0 90 15 45 60 -45 -30 -30;
%row of initial guess "x" should be deleted.
15 30 45 60 -45 -30 0 90 15 30 45 60 -45 -30 0 90 15 45 60 -45 -30 15;
15 30 45 60 -45 -30 0 90 15 30 45 60 -45 -30 0 90 15 45 60 -45 -30 30;
15 30 45 60 -45 -30 0 90 15 30 45 60 -45 -30 0 90 15 45 60 -45 -30 45;
15 30 45 60 -45 -30 0 90 15 30 45 60 -45 -30 0 90 15 45 60 -45 -30 60;
15 30 45 60 -45 -30 0 90 15 30 45 60 -45 -30 0 90 15 45 60 -45 -30 90;];

Best Answer

x= [15 30 45 60 -45 -30 0 90 15 30 45 60 -45 -30 0 90 15 45 60 -45 -30 0];
a = unique(x);
b = a(a ~= x(end));
value = ones(numel(b),1)*x;
value(:,end) = b;