EI - Práctica 2

124 days ago by Juan_Luis_Cano_Rodr_guez

var('omega') 
       
omega
omega
R = 0.992e3 L = 380e-3 C = 4.7e-9 
       
omega_r = 1 / sqrt(L * C) show(omega_r) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}23662.4262140150
\newcommand{\Bold}[1]{\mathbf{#1}}23662.4262140150
Z_s(omega) = i * omega * L + 1 / (i * omega * C) show(Z_s) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\omega \ {\mapsto}\ 0.380000000000000i \, \omega - \frac{2.12765957446809 \times 10^{8}i}{\omega}
\newcommand{\Bold}[1]{\mathbf{#1}}\omega \ {\mapsto}\ 0.380000000000000i \, \omega - \frac{2.12765957446809 \times 10^{8}i}{\omega}
Z_s(omega_r) 
       
0
0
A(omega) = Z_s / (R + Z_s) show(A) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\omega \ {\mapsto}\ \frac{0.380000000000000i \, \omega - \frac{2.12765957446809 \times 10^{8}i}{\omega}}{0.380000000000000i \, \omega - \frac{2.12765957446809 \times 10^{8}i}{\omega} + 992.000000000000}
\newcommand{\Bold}[1]{\mathbf{#1}}\omega \ {\mapsto}\ \frac{0.380000000000000i \, \omega - \frac{2.12765957446809 \times 10^{8}i}{\omega}}{0.380000000000000i \, \omega - \frac{2.12765957446809 \times 10^{8}i}{\omega} + 992.000000000000}
plot(Z_s.abs(), (omega, 2 * pi * 500, 2 * pi * 15000)) 
       
plot(A.abs(), (omega, 2 * pi * 500, 2 * pi * 15000)) 
       
plot(arg(A), (omega, 2 * pi * 500, 2 * pi * 15000)) 
       
Traceback (click to the left of this block for traceback)
...
TypeError: Cannot evaluate symbolic expression to a numeric value.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_11.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("cGxvdChhcmcoQSksIChvbWVnYSwgMiAqIHBpICogNTAwLCAyICogcGkgKiAxNTAwMCkp"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>
    
  File "/tmp/tmpz8X4kN/___code___.py", line 3, in <module>
    exec compile(u'plot(arg(A), (omega, _sage_const_2  * pi * _sage_const_500 , _sage_const_2  * pi * _sage_const_15000 ))
  File "", line 1, in <module>
    
  File "/sagenb/sage_install/sage-4.7.2/local/lib/python2.6/site-packages/sage/misc/functional.py", line 79, in arg
    except AttributeError: return CDF(x).arg()
  File "complex_double.pyx", line 322, in sage.rings.complex_double.ComplexDoubleField_class.__call__ (sage/rings/complex_double.c:3723)
  File "parent.pyx", line 988, in sage.structure.parent.Parent.__call__ (sage/structure/parent.c:7326)
  File "coerce_maps.pyx", line 82, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (sage/structure/coerce_maps.c:3268)
  File "coerce_maps.pyx", line 77, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (sage/structure/coerce_maps.c:3171)
  File "complex_double.pyx", line 356, in sage.rings.complex_double.ComplexDoubleField_class._element_constructor_ (sage/rings/complex_double.c:4167)
  File "expression.pyx", line 953, in sage.symbolic.expression.Expression._complex_double_ (sage/symbolic/expression.cpp:5497)
  File "expression.pyx", line 796, in sage.symbolic.expression.Expression._eval_self (sage/symbolic/expression.cpp:4912)
TypeError: Cannot evaluate symbolic expression to a numeric value.