八度不适用于Symbols软件包

如何解决八度不适用于Symbols软件包

当我尝试使用“ syms”功能运行某些文件时,出现此错误

Traceback (most recent call last):
  File "<stdin>",line 4,in <module>
  File "<stdin>",line 12,in octoutput_drv
  File "<stdin>",line 55,in octoutput
  File "/home/vitorfrois/.local/lib/python3.8/site-packages/sympy/__init__.py",line 677,in __getattr__
    return getattr(self.mod,name)
AttributeError: module 'sympy.core.compatibility' has no attribute 'integer_types'
error: Python exception: AttributeError: module 'sympy.core.compatibility' has no attribute 'integer_types'
    occurred while copying variables to Python.
    Try "sympref reset" and repeat your command?
    (consider filing an issue at https://github.com/cbm755/octsympy/issues)
error: called from
    pycall_sympy__ at line 191 column 5
    valid_sym_assumptions at line 38 column 10
    assumptions at line 82 column 7
    syms at line 97 column 13
    StubCurto_Pit1OC at line 86 column 1

我已经尝试过“ sympref reset”并重复我的命令。然后,我收到另一个错误


importing sympy.core.compatibility with 'from sympy import *' has been
deprecated since SymPy 1.6. Use import sympy.core.compatibility
instead. See https://github.com/sympy/sympy/issues/18245 for more
info.

  self.Warn(
Traceback (most recent call last):
  File "<stdin>",line 1,line 54,in octoutput
  File "<stdin>",name)
AttributeError: module 'sympy.core.compatibility' has no attribute 'integer_types'
Waiting...............no output so far

error: ipc_popen2: something wrong? timed out starting python
error: called from
    python_ipc_popen2 at line 101 column 7
    python_ipc_driver at line 62 column 15
    pycall_sympy__ at line 163 column 11
    valid_sym_assumptions at line 38 column 10
    assumptions at line 82 column 7
    syms at line 97 column 13
    StubCurto_Pit1OC at line 86 column 1

这是输入功能

[dstub,lstub] = StubCurto_Pit1OC('StubCurto','Perm_r',1,'Freq',25e6,'ZLinha',50,'ZCarga',50 + 1j*75);

这是我正在使用的八度文件(“ syms”部分在第86行)

function [dstub,lstub]=StubCurto_Pit1OC(varargin)
warning off
c = 299792458;
if strcmp(varargin{2},'Perm_r') && strcmp(varargin{4},'Freq')
    eps_r = varargin{3};
    f = varargin{5};
else
    error('ENTRAR COM VALORES DE PERMISSIVIDADE EL�TRICA RELATIVA E FREQU�NCIA')
end
vp = c/sqrt(eps_r);% vp % VeLocidade 
Lambda = vp/f;     % Comprimrnto de onda
display('Comprimento de Onda Lambda (m)'),display(Lambda)
Beta = 2*pi/Lambda;
d = 0:1e-4:Lambda/4; % dist�ncia da Imped�ncia na linha � carga

if strcmp(varargin{1},'StubCurto')
    CH1 = 1;
end
switch CH1
    %--------------------------LINHA
    case 1
Zo = varargin{7};
ZL = varargin{9};
[Z_d] = (Zo*((ZL + 1j*Zo.*tan(Beta.*d))./(Zo+1j*ZL.*tan(Beta.*d))))/Zo;

Y_d =1./Z_d; % Y_d = Admit�ncia na linha � dist�ncia d da carga

Re_Y = real(Y_d); % Parte real de Y_d

figure,plot(d,Re_Y,'linewidth',3); grid on
title('Real da Admit�ncia da LINHA  f(dist�ncia � carga) (1/Ohm)');
xlabel('d  (m)');ylabel('Y(d) (1/Ohm)');

Im_Y = imag(Y_d); % Parte imagin�ria de Y_d

figure,Im_Y,3); grid on
title('Imagin�rio da Admit�ncia da LINHA  f(dist�ncia � carga) (1/Ohm)');
xlabel('d  (m)');ylabel('jY(d) (1/Ohm)');
 
Zin_Y = 1./(-1j.*Im_Y).*Zo; % Imped�ncia do STUB em fun��o da Admit�ncia
lstubv  = (atan(Zin_Y./(1j*Zo)))./Beta; % Comprimento do STUB
lstubv = abs(lstubv);
figure,plot(Im_Y,lstubv,3); grid on
title('Comprimento do STUB f(Y_d imagin�ria de Y_d) (1/Ohm)');
xlabel('Yin (1/Ohm');ylabel('l (m))');

k=0;
for ct=1:1:size(d)
   if Re_Y(ct)==1 
        k = ct;
   end
   if .900000<= Re_Y(ct) && Re_Y <= 1.00001
        k = ct;
   end
end
if k==0
  k = find(abs(Re_Y-1) < 1e-4);
end
k
cont = isempty(k);
if cont == 1
    display('Real Y_d < 1');display('   ')
    error('n�o � poss�vel casar as imped�ncias com STUB')
end   
x = (ceil(mean(k)));% x
dstub = x*1e-4;
D_Lam_Stub = (double(dstub/Lambda));
display('dist�ncia do stub � carga em comprimentos de onda (Lambda)');
display(D_Lam_Stub);

display('dist�ncia do stub � carga (m)')
display(dstub)

imstub = Im_Y(x);
Zin = 1/(-1j*imstub)*Zo;
syms l
[lstub] = abs(double((solve(Zin - 1j*Zo*tan(Beta*l),l))));
L_Lam_Stub = (double(lstub/Lambda));
display('Comprimento do stub em curto em comprimentos de onda (Lambda)');
display(L_Lam_Stub)
display('Comprimento do stub em curto (m)'),display(lstub)
end
end

帮我解决syms pkg问题,以便我可以运行该功能而没有任何问题

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?
Java在半透明框架/面板/组件上重新绘画。
Java“ Class.forName()”和“ Class.forName()。newInstance()”之间有什么区别?
在此环境中不提供编译器。也许是在JRE而不是JDK上运行?
Java用相同的方法在一个类中实现两个接口。哪种接口方法被覆盖?
Java 什么是Runtime.getRuntime()。totalMemory()和freeMemory()?
java.library.path中的java.lang.UnsatisfiedLinkError否*****。dll
JavaFX“位置是必需的。” 即使在同一包装中
Java 导入两个具有相同名称的类。怎么处理?
Java 是否应该在HttpServletResponse.getOutputStream()/。getWriter()上调用.close()?
Java RegEx元字符(。)和普通点?