I don't understand why This code doesn't work ----error
이전 댓글 표시
i want to solve this problem... here is my code...
This doesn't work saying "??? Undefined function or method 'power' for input arguments of type 'function_handle'."
please help me...
I have constant of R,th,C00 and so on
diC1=@(z) (((2*pi*e0)*((R^2)*(1-sin(th)))/((z)*(z)+R*sin(th))));
Call1=@(z) 2*pi*e0*R*log(1+R*(1-sin(th))/z)+C00;
Re1=@(z) ((diC1)*(j/(2*pi*f*(Call1).^2))*(yab/((1+yaa*Rs)*(1+ybb*ZL)-(yab)^2*Rs*ZL))...
-yab*ZL*(ybb+yaa*ybb*Rs-yab^2*Rs)/((1+yaa*Rs)*(1+ybb*ZL)-yab^2*Rs*ZL)^2);%*(z(i)-z0);
z=0:0.1:10;
plot(z,Re1(z))
댓글 수: 1
Adam
2017년 3월 16일
Using just 'j' and 'i' should work fine for complex numbers, but it is recommended to use 1j or 1i for complex numbers. This isn't related to your error, just a comment based on the discussion in Torsten's answer.
채택된 답변
추가 답변 (1개)
Torsten
2017년 3월 16일
diC1= (((2*pi.*e0).*((R.^2).*(1-sin(th)))./((z).*(z)+R.*sin(th))));
Call1= 2*pi.*e0.*R.*log(1+R.*(1-sin(th))./z)+C00;
Re1= ((diC1).*(j./(2*pi.*f.*(Call1).^2)).*(yab./((1+yaa.*Rs).*(1+ybb.*ZL)-(yab).^2.*Rs.*ZL))...
-yab.*ZL.*(ybb+yaa.*ybb.*Rs-yab.^2.*Rs)/((1+yaa.*Rs).*(1+ybb.*ZL)-yab.^2.*Rs.*ZL).^2);%*(z(i)-z0);
z=0:0.1:10;
plot(z,Re1)
Of course, all variables you use have to be defined in advance.
Is "j" supposed to be the imaginary unit ?
Best wishes
Torsten.
카테고리
도움말 센터 및 File Exchange에서 Poisson Distribution에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!