Error fsolve undefined function or variable x.
Show older comments
Could anyone say to me which is the problem here? Thanks in advance.
function F = prova(x)
k=1.38*10^(-23);
Tc=298.15;
q=1.6*10^(-19);
VT=k*Tc/q;
Isc=5.96;
Voc=62.18;
Imp=5.65;
Vmp=50.61;
Rs=0;
F(1)= x(1)-Isc-x(2)*(exp((Isc*Rs)/(x(3)*VT))-1);
F(2)= x(1)-Imp-x(2)*(exp((Vmp+Imp*Rs)/(x(3)*VT))-1);
F(3)= x(1)-x(2)*(exp((Voc)/(x(3)*VT))-1);
F=[F(1),F(2),F(3)];
x0=[6 0.5 1.2];
x=fsolve(@prova,x0);
end
Accepted Answer
More Answers (1)
Alex Sha
on 9 Feb 2020
taking initial start-values as:
x0=[6 0.5 150];
will produce:
x1: 5.96
x2: 7.50486851347978E-7
x3: 152.194203428967
Categories
Find more on Hilbert and Walsh-Hadamard Transforms 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!