Skip to content

Commit

Permalink
maint: Merge stable to default.
Browse files Browse the repository at this point in the history
  • Loading branch information
NRJank committed Jan 10, 2024
2 parents ccd81bb + b80c093 commit a00c822
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion etc/NEWS.9.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ Summary of bugs fixed for version 9.1.0 (yyyy-mm-dd):
----------------------------------------------------

- Bugfixes to `whos -file`, `urlread`, `mat2cell`, `set`, `savepath`,
`loadpath` and the general interpreter stack-handling.
`loadpath`, `griddata`, and the general interpreter stack-handling.

- Better input validation for `sparse`, `speye`.

Expand Down
12 changes: 11 additions & 1 deletion scripts/geometry/griddata.m
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@
z3 = z(tri(:,3));

## Calculate norm vector.
N = cross ([x2-x1, y2-y1, z2-z1], [x3-x1, y3-y1, z3-z1]);
N = cross ([x2-x1, y2-y1, z2-z1], [x3-x1, y3-y1, z3-z1], 2);

## Normalize.
N = diag (norm (N, "rows")) \ N;

Expand Down Expand Up @@ -330,6 +331,15 @@
%! zz2(isnan (zz)) = NaN;
%! assert (zz, zz2, 100*eps);

%!testif HAVE_QHULL <*65146> # Ensure correct output for 3-point queries.
%! xi = [1 2 3];
%! a = griddata (xi, xi, xi .* xi', xi, xi, "linear");
%! assert (a, [1, 4, 9]', 10*eps);
%! a = griddata (xi, xi, xi .* xi', xi', xi', "linear");
%! assert (a, [1, 4, 9]', 10*eps);
%! a = griddata (xi, xi, xi .* xi', [xi; xi], [xi; xi], "linear");
%! assert (a, [1, 4, 9; 1, 4, 9], 10*eps);

## Test input validation
%!error <Invalid call> griddata ()
%!error <Invalid call> griddata (1)
Expand Down

0 comments on commit a00c822

Please sign in to comment.