Info

此问题已关闭。 请重新打开它进行编辑或回答。

Inner matrix dimensions must agree.

1 次查看(过去 30 天)
P
P 2011-4-17
关闭: MATLAB Answer Bot 2021-8-20
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.

回答(1 个)

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

此问题已关闭。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by