Hi all,
How to compare the two parameters (0-1 parameters) together and find out if they are the same or not?
I wanted to use the Sameas command but I could not do it.
example compare ‘a’
set i/1*5/
k(i);
parameters
a(i) /1 1,2 0,3 1,4 0,5 0/
b(i) /1 0,2 1,3 1,4 0,5 0/
c(i) /1 1,2 0,3 1,4 0,5 0/
d(i) /1 1,2 0,3 1,4 0,5 1/
e(i) /1 1,2 1,3 1,4 0,5 1/
must to see a<>b and a=c, a<>d.
My try
k(i)$(a(i))=yes;
scalar counter/0/
same/0/;
*count the number of index tha a(i) and b(i) are same
loop(i$,
counter=0;
if( abs(a(i)-b(i))< EPS,
counter= counter+1;
else
break;
);
);
if(counter=card(k),
same=1;
else
same=0;
display same;
);
I don’t know How to use this methods for other parmeters (c,d,e,…) too? (in the loop?)
Thanks!