Can someone explain how this line in the code works?

조회 수: 1 (최근 30일)
Ash matlab
Ash matlab 2020년 4월 6일
댓글: Star Strider 2020년 4월 6일
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
Ash matlab
Ash matlab 2020년 4월 6일
It's a function but not a standard MATLAB function
Star Strider
Star Strider 2020년 4월 6일
The fzero function is a standard MATLAB function!

댓글을 달려면 로그인하십시오.

채택된 답변

Star Strider
Star Strider 2020년 4월 6일
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
Ash matlab
Ash matlab 2020년 4월 6일
Ohh that's pretty cool! Thank you
Star Strider
Star Strider 2020년 4월 6일
As always, my pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by