function result=Uval(Us,Ud,Sbt,Uf,Vg) result=(0.0256*Us.+0.0256*Sbt.*(exp(Uf).*(exp(-Us).+Us.-1)+exp(-Uf).*(exp(Us.-Ud).-Us.-exp(-Ud))).^0.5).-Vg; ...
...
Us=fsolve(@(Us) Uval(Us,Ud,Sbt,Uf,Vg) , init);
....
...
Code above works on matlab. The equation is parametric. And depends on "Ud" "Sbt" "Uf" "Vg" parameters. "Us" is unknown (like x) "Ud" is 1*100 matrix and rest are constants. In matlab after this code "Us" becomes 1*100 matrix and has been solved 100 times according to "Ud" .
This code hasnt been accepted by octave. I checked everything but coulndt find equivalent...