surrounded matrix
With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones:
A = [1 2 ...
1 month ago
Solved
Matrix with different incremental runs
Given a vector of positive integers
a = [ 3 2 4 ];
create the matrix where the *i* th column contains the vector *1:a(i)...
Back to basics 23 - Triangular matrix
Covering some basic topics I haven't seen elsewhere on Cody.
Given an input matrix, return a matrix with all elements above a...
1 month ago
Solved
Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody.
Given an input matrix, generate an output matrix that consists o...
1 month ago
Solved
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...
1 month ago
Solved
Pizza!
Given a circular pizza with radius z and thickness a, return the pizza's volume. [ z is first input argument.]
Non-scored bonus...