bug fixes in matlab port functions

This commit is contained in:
Sebastian Held 2011-04-20 14:25:00 +02:00
parent 3bce66a510
commit c34d100f6e
2 changed files with 3 additions and 3 deletions

View File

@ -146,7 +146,7 @@ port.drawingunit = unit;
port.excite = 0;
% create excitation
if (nargin >= 6) && ~isempty(excitename)
if (nargin >= 7) && ~isempty(excitename)
% excitation of this port is enabled
port.excite = 1;
e_start = v_start;

View File

@ -155,13 +155,13 @@ port.excite = 0;
port.refplaneshift = 0;
port.measplanepos = abs(v2_start(idx_prop) - start(idx_prop));
if (nargin >= 8) && (~isempty(refplaneshift))
if (nargin >= 9) && (~isempty(refplaneshift))
% refplaneshift counts from start of port
port.refplaneshift = refplaneshift - direction*(v2_start(idx_prop) - start(idx_prop));
end
% create excitation
if nargin >= 9
if nargin >= 10
% excitation of this port is enabled
port.excite = 1;
meshline = interp1( mesh{idx_prop}, 1:numel(mesh{idx_prop}), start(idx_prop), 'nearest' );