Re: [問題] 如何計算三角形面積已回收
※ 引述《libobobo (熊)》之銘言:
: % function [A] = area(a,b,c)
刪除第一行的%之後,儲存的檔名需為 area.m
就可以正確執行了。
: % Compute the area of a triangle whose
: % sides have length a, b and c.
: % Inputs:
: % a,b,c: Lengths of sides
: % Output:
: % A: area of triangle
: % Usage:
: % Area = area(2,3,4);
: % Written by dfg, Oct 14, 1996.
: s = (a+b+c)/2;
: A = sqrt(s*(s-a)*(s-b)*(s-c));
: %%%%%%%%% end of area %%%%%%%%%%%
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 66.71.92.23
MATLAB 近期熱門文章
PTT數位生活區 即時熱門文章