Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

trying to plot the phase angel of a laplace transferfunction

hello, I'm new to sagemath and while i was trying to dig into it i came across the following problem see my small program... ​

n=1;1;1000

T1=0.1 w=2pi10*n/1000

S=I*w

F(S)=1/(1+S*T1)

P1=plot_loglog(abs(F), xmin=0.1, xmax=100.0, ymin=0.1)

P2=plot_semilogx(arg(F), xmin=0.1, xmax=100.0, ymax=0, ymin=-90)

P=P1+P1 p.show()

I'm getting the following error message:

I dont know how to fix this, i would really apreciate if one can give me some hints...


TypeError Traceback (most recent call last)

<ipython-input-1-b52c0c8fff57> in <module>()

8

9 P1=plot_loglog(abs(F), xmin=RealNumber('0.1'), xmax=RealNumber('100.0'), ymin=RealNumber('0.1'))

---> 10 P2=plot_semilogx(arg(F), xmin=RealNumber('0.1'), xmax=RealNumber('100.0'), ymax=Integer(0), ymin=-Integer(90))

11 P=P1+P1

12 p.show()

/home/sc_serv/sage/src/sage/symbolic/function.pyx in sage.symbolic.function.BuiltinFunction.__call__ (build/cythonized/sage/symbolic/function.cpp:11602)()

992 res = self._evalf_try_(*args)

993 if res is None:

--> 994 res = super(BuiltinFunction, self).__call__(

995 *args, coerce=coerce, hold=hold)

996

/home/sc_serv/sage/src/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (build/cythonized/sage/symbolic/function.cpp:6439)()

472 if callable(method):

473 return method()

--> 474 raise TypeError("cannot coerce arguments: %s" % (err))

475

476 else: # coerce == False

TypeError: cannot coerce arguments: no canonical coercion from Callable function ring with argument S to Symbolic Ring

trying to plot the phase angel of a laplace transferfunction

hello, I'm new to sagemath and while i was trying to dig into it i came across the following problem see my small program... ​

n=1;1;1000

n=1;1;1000
T1=0.1 w=2pi10*n/1000

S=I*w

F(S)=1/(1+S*T1)

w=2*pi*10*n/1000 S=I*w F(S)=1/(1+S*T1) P1=plot_loglog(abs(F), xmin=0.1, xmin=0.1, xmax=100.0, ymin=0.1)

ymin=0.1) P2=plot_semilogx(arg(F), xmin=0.1, xmin=0.1, xmax=100.0, ymax=0, ymin=-90)

ymin=-90) P=P1+P1 p.show()

p.show()

I'm getting the following error message:

I dont know how to fix this, i would really apreciate if one can give me some hints...


---------------------------------------------------------------------------

TypeError Traceback (most recent call
  last)

call last) <ipython-input-1-b52c0c8fff57> in <module>()

8

in <module>() 8 9 P1=plot_loglog(abs(F), xmin=RealNumber('0.1'), xmax=RealNumber('100.0'), ymin=RealNumber('0.1'))

P1=plot_loglog(abs(F), xmin=RealNumber('0.1'), xmax=RealNumber('100.0'), ymin=RealNumber('0.1')) ---> 10 P2=plot_semilogx(arg(F), xmin=RealNumber('0.1'), xmax=RealNumber('100.0'), xmin=RealNumber('0.1'), xmax=RealNumber('100.0'), ymax=Integer(0), ymin=-Integer(90))

ymin=-Integer(90)) 11 P=P1+P1

P=P1+P1 12 p.show()

/home/sc_serv/sage/src/sage/symbolic/function.pyx in sage.symbolic.function.BuiltinFunction.__call__ (build/cythonized/sage/symbolic/function.cpp:11602)()

p.show() /home/sc_serv/sage/src/sage/symbolic/function.pyx in sage.symbolic.function.BuiltinFunction.__call__ (build/cythonized/sage/symbolic/function.cpp:11602)() 992 res = self._evalf_try_(*args)

self._evalf_try_(*args) 993 if res is None:

None: --> 994 res = super(BuiltinFunction, self).__call__(

self).__call__( 995 *args, coerce=coerce, hold=hold)

996

/home/sc_serv/sage/src/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (build/cythonized/sage/symbolic/function.cpp:6439)()

hold=hold) 996 /home/sc_serv/sage/src/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (build/cythonized/sage/symbolic/function.cpp:6439)() 472 if callable(method):

callable(method): 473 return method()

method() --> 474 raise TypeError("cannot coerce arguments: %s" % (err))

475

(err)) 475 476 else: # coerce == False

False TypeError: cannot coerce arguments: no no canonical coercion from Callable Callable function ring with argument S to to Symbolic Ring

Ring

trying to plot the phase angel of a laplace transferfunction

hello, I'm new to sagemath and while i was trying to dig into it i came across the following problem see my small program... ​

n=1;1;1000
T1=0.1 w=2*pi*10*n/1000
S=I*w

F(S)=1/(1+S*T1)

P1=plot_loglog(abs(F), xmin=0.1, xmax=100.0, ymin=0.1)
P2=plot_semilogx(arg(F), xmin=0.1, xmax=100.0, ymax=0, ymin=-90)
P=P1+P1 p.show()

I'm getting the following error message:

I dont know how to fix this, i would really apreciate if one can give me some hints...

---------------------------------------------------------------------------

TypeError Traceback (most recent call last)
<ipython-input-1-b52c0c8fff57> in <module>()
8
9 P1=plot_loglog(abs(F), xmin=RealNumber('0.1'), xmax=RealNumber('100.0'), ymin=RealNumber('0.1'))
---> 10 P2=plot_semilogx(arg(F), xmin=RealNumber('0.1'), xmax=RealNumber('100.0'), ymax=Integer(0), ymin=-Integer(90))
11 P=P1+P1
12 p.show()

/home/sc_serv/sage/src/sage/symbolic/function.pyx in sage.symbolic.function.BuiltinFunction.__call__ (build/cythonized/sage/symbolic/function.cpp:11602)()
992 res = self._evalf_try_(*args)
993 if res is None:
--> 994 res = super(BuiltinFunction, self).__call__(
995 *args, coerce=coerce, hold=hold)
996

/home/sc_serv/sage/src/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (build/cythonized/sage/symbolic/function.cpp:6439)()
472 if callable(method):
473 return method()
--> 474 raise TypeError("cannot coerce arguments: %s" % (err))
475
476 else: # coerce == False

TypeError: cannot coerce arguments: no canonical coercion from Callable function ring with argument S to Symbolic Ring

trying to plot the phase angel angle of a laplace transferfunction

hello, I'm new to sagemath and while i was trying to dig into it i came across the following problem see my small program... ​

n=1;1;1000
T1=0.1 w=2*pi*10*n/1000
S=I*w

F(S)=1/(1+S*T1)

P1=plot_loglog(abs(F), xmin=0.1, xmax=100.0, ymin=0.1)
P2=plot_semilogx(arg(F), xmin=0.1, xmax=100.0, ymax=0, ymin=-90)
P=P1+P1 p.show()

I'm getting the following error message:

I dont know how to fix this, i would really apreciate if one can give me some hints...

---------------------------------------------------------------------------

TypeError Traceback (most recent call last)
<ipython-input-1-b52c0c8fff57> in <module>()
8
9 P1=plot_loglog(abs(F), xmin=RealNumber('0.1'), xmax=RealNumber('100.0'), ymin=RealNumber('0.1'))
---> 10 P2=plot_semilogx(arg(F), xmin=RealNumber('0.1'), xmax=RealNumber('100.0'), ymax=Integer(0), ymin=-Integer(90))
11 P=P1+P1
12 p.show()

/home/sc_serv/sage/src/sage/symbolic/function.pyx in sage.symbolic.function.BuiltinFunction.__call__ (build/cythonized/sage/symbolic/function.cpp:11602)()
992 res = self._evalf_try_(*args)
993 if res is None:
--> 994 res = super(BuiltinFunction, self).__call__(
995 *args, coerce=coerce, hold=hold)
996

/home/sc_serv/sage/src/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (build/cythonized/sage/symbolic/function.cpp:6439)()
472 if callable(method):
473 return method()
--> 474 raise TypeError("cannot coerce arguments: %s" % (err))
475
476 else: # coerce == False

TypeError: cannot coerce arguments: no canonical coercion from Callable function ring with argument S to Symbolic Ring