% PIPE FLOW SETUP % OPEN LOOP PLOT clear all X=0.25;Y=1.0;Z=1.0; A=0.1;B=1.0;T=0.5; GP=1.5;GI=0.0;GD=0.0; W=0.05;DW=0.25; NIT=500; for K=1:NIT S=complex(0.0,W); PID=GD*S+GP+GI/S; num=PID*Z*exp(-T*S); den=(X*S+Y)*(A*S+B); p(K)=real(num/den); q(K)=imag(num/den); W=W+DW; end plot(p,q,p,-q); title('lab gh plot') xlabel('real') ylabel('imag') grid