Skip to content

Commit

Permalink
Some more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasvarga committed Jan 13, 2025
1 parent 7aca48c commit 807355d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/types/PeriodicMatrix_sym.jl
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,15 @@ function Base.show(io::IO, mime::MIME{Symbol("text/plain")}, A::PeriodicSymbolic
period = A.period
nperiod = A.nperiod
println(io, "Period: $period #Subperiods: $nperiod")
show(io, mime, A.F)
if PeriodicMatrices.isconstant(A)
println("\nConstant matrix = ")
Base.print_matrix(IOContext(io, :limit => true), A(0))
else
println("\nPeriodic time-varying matrix = ")
Base.print_matrix(IOContext(io, :limit => true), A.F)
#show(io, mime, A.f)
end
#show(io, mime, A.F)
end

function Base.convert(::Type{PeriodicFunctionMatrix{:c,T}}, A::PeriodicSymbolicMatrix) where T
Expand Down
3 changes: 2 additions & 1 deletion test/test_pmops.jl
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,8 @@ t = rand();
# PeriodicSymbolicMatrix
@show "symbolic operations"

tm = pmrand(PeriodicSymbolicMatrix,2,2)
tm = pmrand(PeriodicSymbolicMatrix,2,2);
display(tm)

@variables t
A11 = [0 1; -10*cos(t)-1 -24-19*sin(t)]
Expand Down

0 comments on commit 807355d

Please sign in to comment.