legsnng.m
来自「计算方法 大学 求根 牛顿求根公式D:matlab mm ootfind.rar」· M 代码 · 共 14 行
M
14 行
function [f,dfdt] = legsnNG(theta,w,h,b)
% legsnNG Evaluate f(theta) and fprime(theta) for the picnic leg problem.
% Used with the Newton's method.
%
% Synopsis: [f,dfdt] = legsnNG(theta)
%
% Input: theta = angle of table leg in radians
% w,h,b = table dimensions
%
% Output: f = value of function that, when theta is a root, is equal to zero
% dfdt = fprime(theta), ie. df/dtheta
f = w*sin(theta) - h*cos(theta) - b;
dfdt = w*cos(theta) + h*sin(theta);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?