function area = triAreaN(A,B)
N = input('Input value for N');
i = input('Input value for i');
A=rand(2,N)
A(find(A<0))=0;
Area=A(1,:).*A(2,:)*1/2
So, this Area is your 1xN array. you can access area of ith triangle by
Area(i)
Regards
Info
此问题已关闭。 请重新打开它进行编辑或回答。
此问题已关闭。
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!