Can someone explain how this line in the code works?

1 Ansicht (letzte 30 Tage)
Ash matlab
Ash matlab am 6 Apr. 2020
Kommentiert: Star Strider am 6 Apr. 2020
Hello,
Can anyone explain how this works?
l_points(3,1)=-r/fzero('quintic', .1) - Ms/(Ml+Ms);
fzero and quintic are both functions. when it says fzero('quintic',0.1) does it mean that 0.1 should run in quintic?
Thanks
  3 Kommentare
Ash matlab
Ash matlab am 6 Apr. 2020
It's a function but not a standard MATLAB function
Star Strider
Star Strider am 6 Apr. 2020
The fzero function is a standard MATLAB function!

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Star Strider
Star Strider am 6 Apr. 2020
The fzero call indicates that the code is to find the value of the ‘quintic’ function argument such that the function value equals zero closest to the 0.1 initial estimate. The 0.1 value is the value that ‘quintic’ uses at the beginning of the search, not the final value. The rest of the line uses the final value to calculate whatever is to be stored in ‘l_points(3,1)’.
  2 Kommentare
Ash matlab
Ash matlab am 6 Apr. 2020
Ohh that's pretty cool! Thank you
Star Strider
Star Strider am 6 Apr. 2020
As always, my pleasure!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Debugging and Analysis finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by