matlab: allow AddLumpedPort with R=inf --> no lumped resistor

pull/1/head
Thorsten Liebig 2012-07-23 12:12:16 +02:00
parent 3546fcc97d
commit 4741bcf069
1 changed files with 2 additions and 2 deletions

View File

@ -50,10 +50,10 @@ else
direction = -1;
end
if (R>0)
if (R>0 && (~isinf(R)))
CSX = AddLumpedElement(CSX,['port_resist_' int2str(portnr)], n_dir-1, 'Caps', 1, 'R', R);
CSX = AddBox(CSX,['port_resist_' int2str(portnr)], prio, start, stop);
else
elseif (R<=0)
CSX = AddMetal(CSX,['port_resist_' int2str(portnr)]);
CSX = AddBox(CSX,['port_resist_' int2str(portnr)], prio, start, stop);
end