I don't understand why This code doesn't work ----error
Show older comments
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 Comment
Adam
on 16 Mar 2017
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.
Accepted Answer
More Answers (1)
Torsten
on 16 Mar 2017
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.
Categories
Find more on Poisson Distribution in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!