triratio.m
来自「Advanced Engineering Mathematics using M」· M 代码 · 共 12 行
M
12 行
function [ratio]=triratio(base,height)% TRIRATIO.M Compute and plot the ratio of area to perimeter of % isosceles triangle given base and height% Call: [ratio]=triratio(base,height)base2=0.5*base;area=base2.*height;perimeter=base+2*sqrt(base2.^2+height.^2);ratio=area./perimeter;%% Note: The preamble and statements could use a few more comments.%
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?