Getting the indices from a matrice
Getting the indices from a matrice.
Inspired by Problem 645. Getting the indices from a vector by the great Doug Hull.
Given a...
Create an anti-identity matrix
Create an anti-identity matrix of given dimension.
Examples
n = 2
A = [0 1; 1 0]
n = 3
A = [0 0 1; 0 1 0; 1 0 0...
7年以上 前
解決済み
Calculate area of sector
A=function(r,seta)
r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...