There are two errors in the code:
1. y=A/2*
2. A right parentheses is missing at the end of the code.
The correct code should be:
y =A/2* ( ((1-n)/t1)*exp( (x-u1)/t1 + sig^2/(2*t1^2) )*erfc( 1/sqrt(2)*((x-u1)/sig+sig/t1) )+ n/t2*exp( (x-u1)/t2 + sig^2/(2*t2^2) )*erfc( 1/sqrt(2)*((x-u1)/sig+ sig/t2) ) );
You can use Brace Matching tool in Code Builder dialog to check parentheses matching for the function definition code.
Sam
OriginLab Technical Services