Filter löschen
Filter löschen

How to make a for loop for fzero solved functions?

1 Ansicht (letzte 30 Tage)
Dameon Solestro
Dameon Solestro am 9 Dez. 2021
Im having some issues making a loop for fzero functions. Basically I want a code that solves for x(i+1) and then uses that value to solve for the next equation
function y=fncsys(x)
x(1)=0.3
y=0
for i=1:4
y = 5(x(i)-x(i+1)) +10((x+i)^2)
end
fzero(@fncsys, 1)

Antworten (0)

Kategorien

Mehr zu Optimization finden Sie in Help Center und File Exchange

Produkte


Version

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by