Re: [問題] 如何計算三角形面積已回收

看板MATLAB作者 (lskiss)時間16年前 (2009/04/06 14:37), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
※ 引述《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
文章代碼(AID): #19sQCk9X (MATLAB)
文章代碼(AID): #19sQCk9X (MATLAB)