Solved


generate nth pentatope number
https://en.wikipedia.org/wiki/Pentatope_number

2 years ago

Solved


Find prime number couples
Given a vector a, which will always contain at least one pair of prime numbers couple, return a matrix called 'couple' in which ...

2 years ago

Solved


MatCAT - Reconstruct X from Its X-rays
Consider a matrix x x = [ 1 2 0 0 5 0 3 0 8 ] If we sum x along the rows we get row_sums = [3 5 11] ...

2 years ago

Solved


Matrix of Multiplication Facts
This is James's daughter again, sneaking into his Cody account. Thanks to your help in my math class last year, I did great! But...

2 years ago

Solved


Given a matrix, swap the 2nd & 3rd columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...

2 years ago

Solved


matrix zigzag
Unfold a 2-D matrix to a 1-D array in zig-zag order, e.g., for matrix [ 1 2 3 ; 4 5 6 ; 7 8 9 ] the resulting 1-...

2 years ago

Solved


Triangle of numbers
Create a matrix with the integers from 1 to |n| arranged in a triangular shape. Every row |i| of the matrix contains |i| inte...

2 years ago

Solved


Basic Mathematics 2
If a 4’ x 8’ sheet of ½” plywood weighs W lbs and you cut an L” x L” robot base from this material, approximately how much weigh...

2 years ago

Solved


Basic Mathematics 3
It was announced during a Robotics Competition kick off that two of the trickiest scoring objects are: soup cans, and beach ball...

2 years ago

Solved


Are all the three given point in the same line?
In this problem the input is the coordinate of the three points in a XY plane? P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) how can...

2 years ago

Solved


Find the largest number
Find the largest number |x| among 4 numbers given as variables |a|, |b|, |c|, and |d|. Example: Input: a = 4; b = 7; c ...

2 years ago

Solved


Octoberfest festival
A group of students decided to visit Octoberfest festival. First they ordered one beer, then after half-hour they taken one more...

2 years ago

Solved


Divide polynomial p1 by p2.
Divide polynomial p1 by p2 given as vectors. Return result q and r vectors which corresponds the quotient and remainder of divis...

2 years ago

Solved


Generate a random matrix A of (1,-1)
Input n: is an positive integer which serves as the dimension of the matrix A; Output: A=(Aij),where each entry Aij is either...

2 years 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...

2 years ago

Solved


Projector Matrix
Write a function to determine whether or not the matrix is a projector. Projector matrices are defined as P^2 = P.

2 years ago

Solved


Repeat string n times
You will be provided a string (s = 'string1_') a starting point (num1 = 6) (always bigger than or equal to zero) and n (n = 3)...

2 years ago

Solved


Getting logical indexes
This is a basic MATLAB operation. It is for instructional purposes. --- Logical indexing works like this. thresh = 4...

2 years ago

Solved


Pell numbers
Find the nth pell number <https://en.wikipedia.org/wiki/Pell_number>

2 years ago

Solved


area of an annulus
Given the diameter d of the inner circle of the annulus. Given length z of a chord of the outer circle of the annulus. This chor...

2 years ago

Solved


Additive persistence
Inspired by Problem 2008 created by Ziko. In mathematics, the persistence of a number is the *number of times* one must apply...

2 years ago

Solved


Count unique orderings of vertices of a polygon
Cody Problem 2671 asks us to determine whether four points can be the corners of a rectangle. The points are not necessarily inp...

2 years ago

Solved


Volume of this donut
Given hole diameter a, and outermost diameter b, determine the volume y of the resulting donut.

2 years ago

Solved


Multiply Column
Given two input, one matrix and one scalar number For example A is a matrix given A = [ 1 2 2 5 2 5 2 3 4 6...

2 years ago

Solved


Where is 1?
There is a 3d matrix [A] that consist of many zeros and only one. A=zeros(100,100,100); i=randi(100); j=randi(100); k=randi(...

2 years ago

Solved


Sherlock Holmes: The Spy Problem
A guest at a party is a spy if this person is not known by any other guest, but knows all of them. There is at most one spy at a...

2 years ago

Solved


Intersection points of a polynomial
Find the intersection points of a polynomial, given by its vector of coefficients with the X-axis and the Y-axis. Input: a poly...

2 years ago

Solved


Functions For Points
Use this fucntion to earn some free points! function y = your_fcn_name(x) y = x^2 + 5; end

2 years ago

Solved


Find triangles from edge
First input is T, a Triplet list of indices -whom each row actually contains the three indices of a triangle vertices-. size(T) ...

2 years ago

Solved


Add two different item as shown in example
Add two different item as shown in example x=5; y='ab'; Then output must be'5ab';

2 years ago

Load more