JUK1
flipReal.m
Go to the documentation of this file.
1 function [stable_p] = flipReal(p)
2 %FLIPREAL Flips real part of complex number if it is positive
3 % This function is for use with vector fitting. If a pole becomes unstable
4 % (moves into the RHP), we make it stable by flipping it back into the LHP
5 
6 %Create negative mask if real part positive
7 mask = -1*sign(real(p));
8 
9 %Flip all positive real parts
10 zR = mask.*real(p);
11 
12 %Create new stable complex poles
13 stable_p = zR + 1j*imag(p);
14 
15 end
16 
Undo scaling of outgoing poles
Create new stable complex poles stable_p
Definition: flipReal.m:13
we make it stable by flipping it back into the LHP Create negative mask if real part positive mask
Definition: flipReal.m:7
Flip all positive real parts zR
Definition: flipReal.m:10
Find a complex rational model for freq domain data for a
Using these poles make(s-a) terms %Each row corresponds to a partial fraction model at one frequency Asys
for j
Definition: interch.m:13