MATLAB: How do i represent the following equation in matlab

bearingfaultswitch

Best Answer

%This is OK, but there is more smarter way to write this, hope some expert will answer
if j==k && phi_s>0 && phi_s<del_phi_do
b=1;
elseif j==k && phi_s>pi && phi_s<del_phi_di+pi
b=(cdr+cdi)/(cdr-cdo);
else
b=0;
end
Related Question