Dimensions do not match.
Afficher commentaires plus anciens
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{:});
X = privBinaryOp(A, B, 'symobj::mtimes');
Réponses (1)
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)
Eint = int(fun,x,-1,1)
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);
Catégories
En savoir plus sur Conversion dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


