@@ -564,18 +564,18 @@ end
564564Base. print (io:: IO , sys:: AbstractStateSpace ) = show (io, sys)
565565
566566function Base. show (io:: IO , sys:: AbstractStateSpace )
567- # Compose the name vectors
568- # inputs = format_names(s.inputnames, "u", "?")
569- # outputs = format_names(s.outputnames, "y", "?")
570- # println(io, "StateSpace:")
571567 println (io, typeof (sys))
568+ A, B, C, D = ssdata (sys)
572569 if nstates (sys) > 0
573- # states = format_names(s.statenames, "x", "?")
574- println (io, " A = \n " , _string_mat_with_headers (sys. A))
575- println (io, " B = \n " , _string_mat_with_headers (sys. B))
576- println (io, " C = \n " , _string_mat_with_headers (sys. C))
570+ length (A) < 200 ? println (io, " A = \n " , _string_mat_with_headers (A)) :
571+ println (io, " A = $(typeof (A))$(size (A)) " )
572+ length (B) < 200 ? println (io, " B = \n " , _string_mat_with_headers (B)) :
573+ println (io, " B = $(typeof (B))$(size (B)) " )
574+ length (C) < 200 ? println (io, " C = \n " , _string_mat_with_headers (C)) :
575+ println (io, " C = $(typeof (C))$(size (C)) " )
576+ length (D) < 200 ? println (io, " D = \n " , _string_mat_with_headers (D)) :
577+ println (io, " D = " , iszero (D) ? " 0" : " $(typeof (D))$(size (D)) " )
577578 end
578- println (io, " D = \n " , _string_mat_with_headers (sys. D), " \n " )
579579 # Print sample time
580580 if isdiscrete (sys)
581581 println (io, " Sample Time: " , sys. Ts, " (seconds)" )
0 commit comments