Solved


Complex number
For complex number c=a+bi, write code that will add a and b together.

5 years ago

Solved


Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...

5 years ago

Solved


Remove the Zero
Given an array n, remove all zeros

5 years ago

Solved


Area of a circle
Find the value for area of the circle if diameter is given

5 years ago

Solved


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

5 years ago

Solved


Perimeter of a semicircle
Given the diameter d, find the perimeter of a semicircle

5 years ago

Solved


Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x. <<https://i.imgur.com/jlZDHhq.png>> Image courtesy of <http://up...

5 years ago

Solved


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

5 years ago

Solved


Piecewise linear interpolation
Given an Mx2 vector and a row of M-1 integers, output a two column vector that linearly interpolates Y times between each succes...

5 years ago

Solved


Pattern Sum
Write a function which receives two single digit positive integers, (k and m) as parameters and calculates the total sum as: k...

5 years ago

Solved


Find the Best Hotels
Given three input variables: * |hotels| - a list of hotel names * |ratings| - their ratings in a city * |cutoff| - the rat...

5 years ago

Solved


Solve the Sudoku Row
*Description* A simple yet tedious task occurs near the end of most Sudoku-solving algorithms, computerized or manual. The ta...

5 years ago

Submitted


patterned_movie
a small animated movie of creating a graphic shown in image.

5 years ago | 1 download |

5.0 / 5
Thumbnail

Solved


Plot Damped Sinusoid
Given two vectors |t| and |y|, make a plot containing a blue ( |b| ) dashed ( |--| ) line of |y| versus |t|. Mark the minimum...

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

5 years ago

Solved


Matrix for beginners
Multiply x and y elemwise.

5 years ago

Solved


Momentum of an Object
P is momentum, m is mass, and v is velocity. Calculate the momentum for an object.

5 years ago

Solved


Newton's Motion Law
F is force, m is mass, and a is acceleration. Calculate the force for an object.

5 years ago

Solved


Speed
x is distance, v is speed, and t is time. Calculate the speed for an object.

5 years ago

Solved


Equilateral Triangle
The length of one side of the equilateral triangle is a. Calculate the area of ​​the equilateral triangle.

5 years ago

Solved


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

5 years ago

Solved


Is my wife right?
Regardless of input, output the string 'yes'.

5 years ago

Solved


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

5 years ago

Solved


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

5 years ago

Solved


Determine Whether an array is empty
Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

5 years ago

Solved


Find max
Find the maximum value of a given vector or matrix.

5 years ago

Solved


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

5 years ago

Solved


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

5 years ago

Solved


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

5 years ago

Solved


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

5 years ago

Load more