function F = executed(x,y)
a = 10;
b = 3;
c = 2;
F(1) = (a*x(1))+(b*x(2)*x(2))-b;
F(2) = (x(1)*x(2))-(exp(x(2)))-c;
fun = @ executed; % jina la file na juu hapo
x0 = [0,0];
x = fsolve(fun,x0)
>> executer
Nataka kusolve optimization problem ila inagoma kila muda nikaamua kuanza na nyepesi kama hii hapa[emoji116]ila kila muda napata error. NOT ENOUGH INPUT ARGUMENTS. Shida inaweza kuwa gani? View attachment 1218083View attachment 1218086
Thanks mkuu imefanya kazi. Wewe nakula title ya 'Genius' from now.create/save files 2 za .m , moja iite executed.m then pachika
Code:function F = executed(x,y) a = 10; b = 3; c = 2; F(1) = (a*x(1))+(b*x(2)*x(2))-b; F(2) = (x(1)*x(2))-(exp(x(2)))-c;
x(1) inasimama badala ya X na x(2) inasimamama badala ya Y
then create/save file lingine .m liite executer.m then pachika
Code:fun = @ executed; % jina la file na juu hapo x0 = [0,0]; x = fsolve(fun,x0)
then kwenye Command Window
Code:>> executer
jibu:
x =
-1.0144 -2.0932
Mkuu hii tunatumia sana kuwaletea maji huko kwenu, gravity, cost, speed, volume, loss, n. k.Mkuu upo bongo?...Nimesoma hiyo matlab as computing using mathematical software lakini toka nimalize chuo sijawah Kuiapply..japo ninatamani kuiapply on real life
create/save files 2 za .m , moja iite executed.m then pachika
Code:function F = executed(x,y) a = 10; b = 3; c = 2; F(1) = (a*x(1))+(b*x(2)*x(2))-b; F(2) = (x(1)*x(2))-(exp(x(2)))-c;
x(1) inasimama badala ya X na x(2) inasimamama badala ya Y
then create/save file lingine .m liite executer.m then pachika
Code:fun = @ executed; % jina la file na juu hapo x0 = [0,0]; x = fsolve(fun,x0)
then kwenye Command Window
Code:>> executer
jibu:
x =
-1.0144 -2.0932