Solved


Convert degrees to radians
Given input in degrees, output to radians

12 months ago

Solved


Matlab Basics - Absolute Value
Write a script that returns the absolute value of the elements in x e.g. x = [-1 -2 -3 -4] --> y = [1 2 3 4]

12 months ago

Solved


Area of a Square
Inside a square is a circle with radius r. What is the area of the square?

12 months ago

Solved


Find the Nth Root of a Given Number
Find the Nth root of a given number x. Examples x = 4096 n = 4 y = 8 x = 625 n = 5 y = 3.6239

12 months ago

Solved


Count up then down
Create a function that produces counting up from 0 up to n then down to 0 n=2 --> 0 1 2 1 0 n=3 --> ...

12 months ago

Solved


Evaluating a polynomial
Given the following polynomial and the value for x, determine y. y = 3x^5 – x^3 + 8x – 3 Example x = 1 y = 3 - 1 +...

12 months ago

Solved


Back to basics 3 - Temp Directory
Covering some basic topics I haven't seen elsewhere on Cody. Return a string that is the path to the system's current temp di...

12 months ago

Solved


Back to basics 15 - classes
Covering some basic topics I haven't seen elsewhere on Cody. Return the class of the input variable.

12 months ago

Solved


Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

12 months ago

Solved


Simple equation: Annual salary
Given an hourly wage, compute an annual salary

12 months ago

Solved


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

12 months ago

Solved


Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

12 months ago

Solved


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Example...

12 months ago

Solved


Remove all the consonants
Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

12 months ago

Solved


Calculate Reynolds Number
Write a MATLAB function that calculates the Reynolds number for flow over a flat plate: ​ ρ = fluid density (kg/m³) V = veloc...

12 months ago

Solved


We love vectorized solutions. Problem 1 : remove the row average.
Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solution will be tested for ac...

12 months ago

Solved


Replicate elements in vectors
Replicate each element of a row vector (with NaN) a constant number of times. Examples n=2, A=[1 2 3] -> [1 1 2 2 3 3] n=0...

12 months ago

Solved


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero i...

12 months ago

Solved


Getting the indices from a matrix
Inspired by Problem 645. Getting the indices from a matrix. Given a matrix A (or a vector), return the indices (always in row...

12 months ago

Solved


Project Euler: Problem 8, Find largest product in a large string of numbers
Find the greatest product of five consecutive digits in an n-digit number. 73167176531330624919225119674426574742355349194934...

12 months ago

Solved


Draw a '4' in a zero matrix!

12 months ago

Solved


Draw a '6' in a zero matrix!

12 months ago

Solved


Draw a '9' in a zero matrix!

12 months ago

Solved


Draw a '7' in a zero matrix!

12 months ago

Solved


Draw a '8' in a zero matrix!

12 months ago

Solved


Draw a '3' in a zero matrix!

12 months ago

Solved


Draw a '2' in a zero matrix!

12 months ago

Solved


Draw a '5' in a zero matrix!

12 months ago

Solved


Find x rows where the sum of the numbers is the maximum
Find x rows where the sum of the numbers is the maximum. For example: when x is 2 and m is 2 3 5 0 2 3 5 5 6 0 9 4 then y =...

12 months ago

Solved


Multiplication
Multiply two numbers in a different manner. The numbers are given to you as vectors x and y. Example x = [ 1 2 0 1 ] ...

12 months ago

Load more