matlab: allow empty directions in field interpolation

Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
pull/10/head
Thorsten Liebig 2013-08-15 16:47:44 +02:00
parent e833c9eaf4
commit f1b2a94633
1 changed files with 15 additions and 3 deletions

View File

@ -38,11 +38,23 @@ if (isnumeric(lines))
x_i = linspace(x(1),x(end),lines(1)); x_i = linspace(x(1),x(end),lines(1));
y_i = linspace(y(1),y(end),lines(2)); y_i = linspace(y(1),y(end),lines(2));
z_i = linspace(z(1),z(end),lines(3)); z_i = linspace(z(1),z(end),lines(3));
else
if isempty(lines{1})
x_i = x;
else else
x_i = lines{1}; x_i = lines{1};
end
if isempty(lines{2})
y_i = y;
else
y_i = lines{2}; y_i = lines{2};
end
if isempty(lines{3})
z_i = z;
else
z_i = lines{3}; z_i = lines{3};
end end
end
field_i = field; field_i = field;
mesh_i = mesh; mesh_i = mesh;