I want to perform below operations on arrays of 100000 rows
I want to perform below operations on arrays of 100000 rows. I used for loop and mathcad got hanged.
Is there any other ways to perform these operations?
Go1 and Go2 are arrays of 10000 rows.
The below code is of matlab and I want to write similar code in mathcad
if ( abs( Go1 - Go2 ) > 1.0 / ( RMAX + 700000 ) )
Rp = ( 1 + r2 - r1 - ( R2t * Go1 - R2b * Go2 ) ) / ( Go1 - Go2 ) - ( R0 + R1 );
Rp = abs(Rp);
x1 = +( R0 + R1 + R2t + Rp ) .* Go1 + r1;
y2 = -( R0 + R1 + R2b + Rp ) .* Go2 - r2;
else
Rp = ( 1 + r2 - r1 ) / ( 2 * Go1 ) - ( R0 + R1 + ( R2t + R2b ) / 2 );
Rp = abs(Rp);
if ( Go1 < 0.5 / ( RMAX + 700000 ) ); Rp = RMAX; end
x1 = 0.5 * ( 1 + r1 + r2 + Go1 * ( R2t - R2b ) );
y2 = 1 - x1;


