Skip to content

Commit 2fd813d

Browse files
authored
removed multiplication sign in tf print (#393)
1 parent e9837ee commit 2fd813d

6 files changed

Lines changed: 24 additions & 24 deletions

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ LaTeXStrings = "1.0"
2828
MacroTools = "0.5"
2929
OrdinaryDiffEq = "5.2"
3030
Plots = "0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 1.0"
31-
Polynomials = "1.0"
31+
Polynomials = "1.1.10"
3232
julia = "1.0"
3333

3434
[extras]

docs/src/examples/example.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ P = tf(B,A)
107107
# output
108108
109109
TransferFunction{Continuous,ControlSystems.SisoRational{Float64}}
110-
1.0
111-
---------------------
112-
1.0*s^2 + 0.4*s + 1.0
110+
1.0
111+
-------------------
112+
1.0s^2 + 0.4s + 1.0
113113
114114
Continuous-time transfer function model
115115
```

docs/src/man/creating_systems.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ tf([1.0],[1,2,1])
1818
# output
1919
2020
TransferFunction{Continuous,ControlSystems.SisoRational{Float64}}
21-
1.0
22-
---------------------
23-
1.0*s^2 + 2.0*s + 1.0
21+
1.0
22+
-------------------
23+
1.0s^2 + 2.0s + 1.0
2424
2525
Continuous-time transfer function model
2626
```
@@ -40,9 +40,9 @@ zpk([-1.0,1], [-5, -10], 2)
4040
# output
4141
4242
TransferFunction{Continuous,ControlSystems.SisoZpk{Float64,Float64}}
43-
(1.0*s + 1.0)(1.0*s - 1.0)
44-
2.0---------------------------
45-
(1.0*s + 5.0)(1.0*s + 10.0)
43+
(1.0s + 1.0)(1.0s - 1.0)
44+
2.0-------------------------
45+
(1.0s + 5.0)(1.0s + 10.0)
4646
4747
Continuous-time transfer function model
4848
```
@@ -57,9 +57,9 @@ tf(zpk([-1], [1], 2, 0.1))
5757
# output
5858
5959
TransferFunction{Discrete{Float64},ControlSystems.SisoRational{Int64}}
60-
2*z + 2
61-
-------
62-
z - 1
60+
2z + 2
61+
------
62+
z - 1
6363
6464
Sample Time: 0.1 (seconds)
6565
Discrete-time transfer function model

docs/src/man/introduction.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ T = P/(1+P)
2828
# output
2929
3030
TransferFunction{Continuous,ControlSystems.SisoRational{Float64}}
31-
1.0*s + 1.0
32-
---------------------
33-
1.0*s^2 + 3.0*s + 2.0
31+
1.0s + 1.0
32+
-------------------
33+
1.0s^2 + 3.0s + 2.0
3434
3535
Continuous-time transfer function model
3636
```
@@ -42,9 +42,9 @@ minreal(T)
4242
# output
4343
4444
TransferFunction{Continuous,ControlSystems.SisoRational{Float64}}
45-
1.0
46-
-----------
47-
1.0*s + 2.0
45+
1.0
46+
----------
47+
1.0s + 2.0
4848
4949
Continuous-time transfer function model
5050
```

src/utilities.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ end
5454
""" f = printpolyfun(var)
5555
`fun` Prints polynomial in descending order, with variable `var`
5656
"""
57-
printpolyfun(var) = (io, p, mimetype = MIME"text/plain"()) -> Polynomials.printpoly(io, Polynomial(p.coeffs, var), mimetype, descending_powers=true)
57+
printpolyfun(var) = (io, p, mimetype = MIME"text/plain"()) -> Polynomials.printpoly(io, Polynomial(p.coeffs, var), mimetype, descending_powers=true, mulsymbol="")
5858

5959
# NOTE: Tolerances for checking real-ness removed, shouldn't happen from LAPACK?
6060
# TODO: This doesn't play too well with dual numbers..

test/test_transferfunction.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ tf(vecarray(1, 2, [0], [0]), vecarray(1, 2, [1], [1]), 0.005)
104104

105105

106106
# Printing
107-
res = ("TransferFunction{Continuous,ControlSystems.SisoRational{Int64}}\nInput 1 to Output 1\ns^2 + 2s + 3\n-------------\ns^2 + 8s + 15\n\nInput 1 to Output 2\ns^2 + 2s + 3\n-------------\ns^2 + 8s + 15\n\nInput 2 to Output 1\n s + 2\n-------------\ns^2 + 8s + 15\n\nInput 2 to Output 2\n s + 2\n-------------\ns^2 + 8s + 15\n\nContinuous-time transfer function model")
108-
@test_broken sprint(show, C_222) == res
109-
res = ("TransferFunction{Continuous,ControlSystems.SisoRational{Int64}}\nInput 1 to Output 1\nz^2 + 2.0z + 3.0\n-----------------\nz^2 - 0.2z - 0.15\n\nInput 1 to Output 2\nz^2 + 2.0z + 3.0\n-----------------\nz^2 - 0.2z - 0.15\n\nInput 2 to Output 1\n z + 2.0\n-----------------\nz^2 - 0.2z - 0.15\n\nInput 2 to Output 2\n z + 2.0\n-----------------\nz^2 - 0.2z - 0.15\n\nSample Time: 0.005 (seconds)\nDiscrete-time transfer function model")
110-
@test_broken sprint(show, D_222) == res
107+
res = ("TransferFunction{Continuous,ControlSystems.SisoRational{Int64}}\nInput 1 to output 1\ns^2 + 2s + 3\n-------------\ns^2 + 8s + 15\n\nInput 1 to output 2\ns^2 + 2s + 3\n-------------\ns^2 + 8s + 15\n\nInput 2 to output 1\n s + 2\n-------------\ns^2 + 8s + 15\n\nInput 2 to output 2\n s + 2\n-------------\ns^2 + 8s + 15\n\nContinuous-time transfer function model")
108+
@test sprint(show, C_222) == res
109+
res = ("TransferFunction{Discrete{Float64},ControlSystems.SisoRational{Float64}}\nInput 1 to output 1\n1.0z^2 + 2.0z + 3.0\n--------------------\n1.0z^2 - 0.2z - 0.15\n\nInput 1 to output 2\n1.0z^2 + 2.0z + 3.0\n--------------------\n1.0z^2 - 0.2z - 0.15\n\nInput 2 to output 1\n 1.0z + 2.0\n--------------------\n1.0z^2 - 0.2z - 0.15\n\nInput 2 to output 2\n 1.0z + 2.0\n--------------------\n1.0z^2 - 0.2z - 0.15\n\nSample Time: 0.005 (seconds)\nDiscrete-time transfer function model")
110+
@test sprint(show, D_222) == res
111111

112112

113113
@test tf(zpk([1.0 2; 3 4])) == tf([1 2; 3 4])

0 commit comments

Comments
 (0)