Solved

Sum of a geometric series
Give the sum of the first 'n' terms of a geometric series, given 'a' as the first term and 'r' as the ratio.

6 mois ago

Solved

Given a matrix A return a vector of the product of the elements in each column using a loop without using prod.
--------------------- for m: 3 1 3 3 10 1 9 1 9 4 1 4 5 6 5 ...

6 mois ago

Solved

Don't be mean. Be nice!
For this problem, you will be given a range of single digits R, and a separate number K. You job is to calculate the mean of al...

6 mois ago

Solved

Given consecutive numbers, add the numbers *without using the sum command in MATLAB.*

6 mois ago

Solved

Cody problems in French : Trouvez la logique Pt.2
Trouvez la logique entre x et y, aidez-vous de la test suite. Bon courage. P.S: L'utilisation de "^" est de nouveau fortement...

6 mois ago

Solved

Given a matrix A (size m x n) create a matrix B which consists of matrix A sorted in descending order by columns and then by rows.
--------------- A= [ 2 6 -3 7 12 0 -12 5 1] --------------- B= [12 7 1 6 2 0 5 -3 ...

6 mois ago

Solved

Given a matrix A (size m x n) create a matrix B (size m+2 x n+2) which consists of matrix A surrounded by zeros. See Example below:
A = [1 2 3 4 5 6] ----------- B = [0 0 0 0 0 0 1 2 3 0 0 4 5 6 0 0 0 0 0 0]

6 mois ago

Solved

Angle between two vectors
Given 2 pairs of _cartesian co-ordinates_, determine the angle between the 2 vectors formed by the _points_ and the _origin_. An...

6 mois ago

Solved

Given a Vector v1, create v2 which is the sum of each two adjacent elements in v1. {length(v2)=length(v1)-1}
if v1 is [1 2 3 4 5 6 7 8] then v2 should be [3 5 7 9 11 13 15]. if v1 is [1; 3; 5; 7] the...

6 mois ago

Solved

Delete the column with all 0 in the TABLE
In the given table (T), delete the column with all 0 data. e.g. input Banana Apple Orange Mellon __...

7 mois ago

Solved

Ratio between sum of primes and sum of factors
Write a function that calculates the ratio between the sum of primes numbers lower or equal to x, and the sum of the factors of ...

7 mois ago

Solved

PACMAT - Ghosts maximize unique locations; 3 Lives
The Classic PACMAN game brought to Cody. PACMAT Ghosts Random requires clearing the board of Yellow Dots while not bumping in...

7 mois ago

Solved

PACMAT - Ghosts Random; 3 Lives
The Classic PACMAN game brought to Cody. PACMAT Ghosts Random requires clearing the board of Yellow Dots while not bumping in...

7 mois ago

Solved

Calculate Resistance 2
In this problem, you have to calculate Resistance R of a linear conductor having voltage V across it and current I is passing i...

7 mois ago

Solved

Calculate Resistance
Calculate Resistance R of a linear conductor having resistivity p, length l and area A

7 mois ago

Solved

In this problem, you have to add three numbers a, b and c. Give output d = add(a,b,c)

7 mois ago

Solved

Ratio between sum of primer numbers and non-prime numbers
Write a function that calculates the ratio between the sum of the prime numbers lower or equal than x, and the sum of the non-pr...

7 mois ago

Solved

PACMAT Easy
The Classic PACMAN game brought to Cody. PACMAT_Easy is the simple case of clearing the board of Yellow Dots while not bumpin...

7 mois ago

Solved

Pair Primes
Let's define pair primes as follow; * *For 2 digits numbers:* 11 and 17 are pair primes because both of them are 2 digits pri...

8 mois ago

Solved

Lights Out 3 - 5x5, 6 moves
<https://en.wikipedia.org/wiki/Lights_Out_(game) Lights Out> is a logic game wherein all lights need to be turned off to complet...

8 mois ago

Solved

Lights Out 1 - 5x5, 3 moves
<https://en.wikipedia.org/wiki/Lights_Out_(game) Lights Out> is a logic game wherein all lights need to be turned off to complet...

8 mois ago

Solved

Lights Out 2 - 5x5, 4 moves
<https://en.wikipedia.org/wiki/Lights_Out_(game) Lights Out> is a logic game wherein all lights need to be turned off to complet...

8 mois ago

Solved

Word Distance - Sum
Let's suppose that the distance of a word can be calculated by summing the differences between its letters, having assigned the ...

8 mois ago

Solved

Get the value 100
Knowing that 123-45-67+89=100, write a function that gives this result for any order of the digits in the input. Otherwise, the ...

8 mois ago

Solved

Get the mean digit
Write a function that gives the mean digit (round towards nearest integer) of an input and positive number. For example: x ...

8 mois ago

Solved

One track five lanes
Find the minimum number of lane changes necessary to cross the entire track without running into any obstacles <<http://www.a...

8 mois ago

Solved

Scalar Matrix Manipulation
Assume, input x is a scalar matrix such as, x = 2 0 0 0 2 0 0 0 2 th...

8 mois ago

Solved

Find the complement of a number in binary
Input x is a decimal number and output y is the complement of binary representation of x. For example, x = 10 has the binary ...

8 mois ago

Solved

Calculate the square of a number (Super Easy)
The goal is to calculate the square (y) of a number (x). Good way to start MatLab for beginners.

8 mois ago

Solved

Just another sum (JAS)
*Task:* Write a function that takes a vector X and returns the alternating sum of X: X(1)-X(2)+X(3)-X(4)+... *Example...

8 mois ago