Solved


Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10. For example, if you add the di...

28 days ago

Solved


Is this matrix orthogonal?
Given a square matrix, a, determine whether it is orthogonal. INPUT: a, a n x n matrix OUTPUT: true or false

28 days ago

Solved


Three...is a magic number.
Yes it is... It's a magic number... To help you get rid of that earworm, here's a new Cody problem. You are given a squar...

28 days ago

Solved


Approximate e
Given a and n, compute and approximation to f = a * e ^ n, without the use of exp, string operations, or floating point numbers....

28 days ago

Solved


Polar Form Complex Number Entry
Write a function that takes the magnitude and angle(in degrees) of a complex number and returns a complex variable. Positive ang...

28 days ago

Solved


Find Logic 30

28 days ago

Solved


Find Logic 32

28 days ago

Solved


Find Logic 28

28 days ago

Solved


Stress-Strain Properties - 8
Up to this point, you've calculated some material properties based on tensile stress-strain data. For this problem, you are task...

28 days ago

Solved


Stress-Strain Properties - 7
The toughness of a material is technically defined as the plastic strain energy absorbed by the material (the plastic region in ...

28 days ago

Solved


Stress-Strain Properties - 6
The total energy absorbed by a material up to failure in a tensile test is termed the absorbed strain energy. With respect to th...

28 days ago

Solved


Matrix to vector transformation
given a matrix, make in the output 1 column vector putting odd numbers in ascending order after that put the even numbers in des...

29 days ago

Solved


Create a vector of the first n natural numbers (★)
If n = 7, your program should return a vector y, where y = [1 2 3 4 5 6 7].

29 days ago

Solved


Check if equal
Return true if all the elements of an nD array are equal, false otherwise.

29 days ago

Solved


Ring Matrix
Given n (only odd), return output matrix a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. ...

29 days ago

Solved


Create logarithmically spaced values (★)
Given three numbers a,b,n with b>a, create a vector y with n logarithmic spaced values between 10^a and 10^b. Thus, if a = -2, ...

29 days ago

Solved


Remove DC
Input x is the sampled signal vector, may have both AC and DC components. Output y should not contain any DC component. Examp...

29 days ago

Solved


Remove the air bubbles from a vector
_*A reduced version of Problem 112*_ Given a column vector v, return a vector w in which all the zeros have "bubbled" to the ...

29 days ago

Solved


Guess
A random number between 1 and 10 is created for the variable y. Guess what its value is.

29 days ago

Solved


Perimeter
Given a sequence of points forming a closed path (first and last points are coincident) return the perimeter value. For example...

29 days ago

Solved


Is there a GPU Device?
Return true if there is a supported GPU device available on the Cody computer.

29 days ago

Solved


Draw a '7' in a zero matrix!

29 days ago

Solved


Sum of elements in a vector (★)
(copy of Prob. 3) Find the sum of all the numbers of the input vector x. Input x = [1 2 3 5] Output y is 11 <> ...

29 days ago

Solved


Find nth triangular number.
Calculate the triangular number of given integer n.

29 days 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...

29 days ago

Solved


Matrix Generation.
if input n =1, generate a matrix y = [1]

29 days ago

Solved


Divisible by 21
Write a function to determine if a number is divisible by 21.

29 days ago

Solved


Guess the logic

29 days ago

Solved


Area of right triangle
Given a hypotenuse and a leg , calculate the area of right triangle.

29 days ago

Solved


Multiplying the Sums of Two Arrays
Get two arrays, add the values within the array up, and then multiply the two total values. [2,3]*[3,6] 5*18 90

29 days ago

Load more