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!