Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Inner matrix dimensions must agree.

1 vue (au cours des 30 derniers jours)
P
P le 17 Avr 2011
Clôturé : MATLAB Answer Bot le 20 Août 2021
I have this program
clear all;
f=1E3;
L1=1E-3;
L2=100;
Rs=1E-6;
R1=10;
w=2*pi*f;
k=10;
%yk=eye(21);
cnt = 1;
for a = -11:k-1
omega = w*(a+1);
yk(cnt,cnt)=1/[Rs+(j*omega*L2*(R1+j*omega*L1))/(R1+j*omega*(L1+L2))];
cnt = cnt + 1;
end
Ek=5/sqrt(2);
%uab0=zeros(21,1);
cnt = 1;
for b= -11:k-1
omega= w*(b+1);
uab0(cnt,1)=j*omega*L2*[(-Ek)/(R1+j*omega*(L1+L2))];
cnt = cnt + 1;
end
Is=1E-9;
kt = 1.38*10^(-23);
q = 1.602*10^(-19);
T = 300;
VT = kt*T/q;
m = 1.5;
x=load('F:\udk.txt');
for i = 1:21
idk=Is*(exp(x/(m*VT))-1);
end
idt=fft(idk);
udt=fft(x);
Il=yk*udt-yk*uab0;
In=idt;
F=In+Il;
Err=conj(F)*F;
My problem is in the last line where I want to calculate the error Err.

Réponses (1)

bym
bym le 17 Avr 2011
What form do you expect Err to be? Perhaps you want
Err = conj(F).*F %<-note dot before *

Cette question est clôturée.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by