matlab: allow empty number of lines for field interpolation
Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>pull/12/head
parent
6892a0c589
commit
b44f8de350
|
@ -35,9 +35,21 @@ y = mesh.lines{2};
|
||||||
z = mesh.lines{3};
|
z = mesh.lines{3};
|
||||||
|
|
||||||
if (isnumeric(lines))
|
if (isnumeric(lines))
|
||||||
|
if (lines(1)==0)
|
||||||
|
x_i = x;
|
||||||
|
else
|
||||||
x_i = linspace(x(1),x(end),lines(1));
|
x_i = linspace(x(1),x(end),lines(1));
|
||||||
|
end
|
||||||
|
if (lines(2)==0)
|
||||||
|
y_i = y;
|
||||||
|
else
|
||||||
y_i = linspace(y(1),y(end),lines(2));
|
y_i = linspace(y(1),y(end),lines(2));
|
||||||
|
end
|
||||||
|
if (lines(3)==0)
|
||||||
|
z_i = z;
|
||||||
|
else
|
||||||
z_i = linspace(z(1),z(end),lines(3));
|
z_i = linspace(z(1),z(end),lines(3));
|
||||||
|
end
|
||||||
else
|
else
|
||||||
if isempty(lines{1})
|
if isempty(lines{1})
|
||||||
x_i = x;
|
x_i = x;
|
||||||
|
|
Loading…
Reference in New Issue