class_docstr: A printer to convert expressions to strings of Octave/Matlab code.
class_docstr_tok: ["A","printer","to","convert","expressions","to","strings","of","Octave\/Matlab","code","."]
code: def _print_MatrixSlice(self, expr):
      def strslice(x, lim):
          l = x[0] + 1
          h = x[1]
          step = x[2]
          lstr = self._print(l)
          hstr = "end" if h == lim else self._print(h)
          if step == 1:
              if l == 1 and h == lim:
                  return ":"
              if l == h:
                  return lstr
              else:
                  return lstr + ":" + hstr
          else:
              return ":".join((lstr, self._print(step), hstr))
  
      return (
          self._print(expr.parent)
          + "("
          + strslice(expr.rowslice, expr.parent.shape[0])
          + ", "
          + strslice(expr.colslice, expr.parent.shape[1])
          + ")"
      )
  
imports: from __future__ import annotations
  from typing import Any
  from sympy.core import Mul, Pow, S, Rational
  from sympy.core.mul import _keep_coeff
  from sympy.core.numbers import equal_valued
  from sympy.printing.codeprinter import CodePrinter
  from sympy.printing.precedence import precedence, PRECEDENCE
  from re import search
label_desc: Use image node_id 29 for calling the OctaveCodePrinter obj's underlying member method code with example usage: obj._print_MatrixSlice(expr) and returns: unknown, str, str, lstr, unknown