添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
please help me in corecting this code. I have to give A as array of 10 values but getting error like dimensions are not matching .. please help me how to match the dimensions.
theta=-1:0.01:1;
u=sin(theta);
for theta= -1:0.01:1
syms x
A=[0.96058 0.82596 0.576 0.29171 0.12276 0.12276 0.29171 0.576 0.82596 0.96058];
fun=A*exp(1j*pi*30*u*x);
E=int(fun,x,-1,1);
end
M=max(E);
Y=abs(E);
G=Y./M;
Edb=20*log10(G);
plot(u,Edb);
error:
Error using symengine
Dimensions do not match.
Csym = mupadmex(op,args{1}.s, args{2}.s, varargin{:});
Error in * ( line 315 )
X = privBinaryOp(A, B, 'symobj::mtimes');
thetavals = -1:0.01:1;
A = [0.96058 0.82596 0.576 0.29171 0.12276 0.12276 0.29171 0.576 0.82596 0.96058];
u = sin(thetavals);
syms x U real
fun = A*exp(1j*pi*30*U*x)
fun =
Eint = int(fun,x,-1,1)
Eint =
E0 = limit(Eint, U, 0);
E0idx = find(u == 0);
u(E0idx) = nan;
E = subs(Eint, U, u(:));
E(E0idx,:) = E0;
M = max(E, 2);
Y = abs(E);
G = Y./M;
Edb = 20*log10(G);
plot(thetavals, Edb);

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!