Skip to content

Commit

Permalink
fix install error on Octave 6
Browse files Browse the repository at this point in the history
  • Loading branch information
ttl-octave committed Apr 5, 2023
1 parent 0482f0a commit 0faa529
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lti_input_idx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,13 @@ Read the source code in @code{lti_input_idx.cc} for details.\n\
offset = 1;
}

#if OCTAVE_MAJOR_VERSION > 8
octave::range<double> mat_idx (1, idx-offset);
octave::range<double> opt_idx (idx+1-offset, len);
#else
Range mat_idx (1, idx-offset);
Range opt_idx (idx+1-offset, len);
#endif

retval(2) = offset; // abused as logical in the LTI constructors
retval(1) = opt_idx;
Expand Down
4 changes: 4 additions & 0 deletions src/sl_ab08nd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,11 @@ For internal use only.")
if (m == 1 && p == 1)
{
if (nu < n)
#if OCTAVE_MAJOR_VERSION > 8
gain = c * octave::xpow (a, double (n-1-nu)).matrix_value() * b;
#else
gain = c * xpow (a, double (n-1-nu)).matrix_value() * b;
#endif
else
gain = d;
}
Expand Down

0 comments on commit 0faa529

Please sign in to comment.