ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 14 Apr 2021 07:08:38 +0200Moving a shift entered result as a code in another filehttps://ask.sagemath.org/question/56645/moving-a-shift-entered-result-as-a-code-in-another-file/So suppose I did tons of code and end up with this result.
![C:\fakepath\Screenshot (82).png](/upfiles/16183768387013993.png)
I want to use this result in a new code, say another new file.
If I copy and paste this, it would not work as I would have to
manually put parenthesis around each exponent. Is there
some way to convert this output to code (basically the polynomials
with the parenthesis on the exponents) and transport it to another file?whatupmattWed, 14 Apr 2021 07:08:38 +0200https://ask.sagemath.org/question/56645/Trying to find phase and group delay of transfer functionshttps://ask.sagemath.org/question/29386/trying-to-find-phase-and-group-delay-of-transfer-functions/ I have several functions I would like to get the phase and group delay. In python I did the following
from sympy import pi, Symbol, I , atan, im, re, simplify, collect, trigsimp, sign
fr = Symbol('fr', real=True)
fo = Symbol('fo', real=True)
fn = Symbol('fn', real=True)
f = Symbol('f',real=True)
q = Symbol('q', real=True)
qn = Symbol('qn', real=True)
wr = 2*pi*fr
wo = 2*pi*fo
wn = 2*pi*fn
w = 2*pi*f
s = I*w
# Lp1 - s domain
H_lp1 = wr/(s+wr)
(re_part,im_part) = H_lp1.expand(complex=True).as_real_imag()
H_lp1_ph = atan(im_part/re_part)
Which returns the correct answer but when I try a more complicated function such as
H_lpn2 = ((s**2+wn**2)*(wo/wn)**2)/(s**2+s*(wo/q)+wo**2)
(re_part,im_part) = H_lpn2.expand(complex=True).as_real_imag()
H_lpn2_ph_expanded = atan(im_part/re_part)
H_lpn2_ph = simplify(H_lpn2_ph_expanded)
It does not return the complete solution. Any ideas?
leftiTue, 01 Sep 2015 19:07:21 +0200https://ask.sagemath.org/question/29386/Are there transfer function, state space, and bode plots?https://ask.sagemath.org/question/23853/are-there-transfer-function-state-space-and-bode-plots/ I am looking for something like tf(), ss(), and bode() in control package of Octave, but I don't see them in sage. Are there any equivalents?Rongcui DongWed, 20 Aug 2014 15:06:30 +0200https://ask.sagemath.org/question/23853/Take a screenshot, and transfer it to a windows partition/drive path?https://ask.sagemath.org/question/10500/take-a-screenshot-and-transfer-it-to-a-windows-partitiondrive-path/I currently run Sage math 5.9 through, VirtualBox Fedora linux virtual machine, on Microsoft Windows 7.
I performed the following calculations.
eq1i = integral( sqrt( 1 + 1/(4*x)) )
f(x) = eq1i.subs(x=x)
show(eq1i)
float( f(4) - f(1) )
As you may see, I did show(eq1i), to display the integral result in a more readable format.
I'd like to to take a screenshot of my results in Sage, so then I can use an image editing program in Windows, such as MS Paint or Adobe Photoshop, and crop out the result of show(eq1i), result.bxdinTue, 03 Sep 2013 14:16:08 +0200https://ask.sagemath.org/question/10500/