There is a way to assume a symbolic variable as an natural number using ModelingToolkit.jl? I’m trying to raise an 2x2 matrix to an natural number as follows:
using LinearAlgebra
using ModelingToolkit
@variables n
A = [4.5 8.0;-2.0 -3.5]^n
Which returns the error:
MethodError: no method matching isinteger(::Num)
Closest candidates are:
isinteger(!Matched::Integer) at number.jl:20
isinteger(!Matched::Complex) at complex.jl:134
isinteger(!Matched::Rational) at rational.jl:265
...
in eval at base/boot.jl:360
in top-level scope at Lista_03_FM223_Vinicius_de_Souza_Lima.jl:7
in ^ at stdlib/v1.6/LinearAlgebra/src/dense.jl:499