解決済み

Summation of array

Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

6ヶ月 前

解決済み

If-then-else

Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...

6ヶ月 前

解決済み

Count decimal digits of a number

* Given an integer number you have to return the number of its digits. * For example 248 has 3 digits and 1589 has 4 digits ...

6ヶ月 前

解決済み

Area of a triangle

A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.

6ヶ月 前

解決済み

Do you like your boss?

Do you like your boss? Answer can be any string! For example: Boss = 'Do you like your boss?'; Output = 'yes' or ...

7ヶ月 前

解決済み

Roots

Find out the roots of a given polynomial equation.Given are the coefficients of the equation.

8ヶ月 前

解決済み

Create a Matrix of Zeros

Given an input x, create a square matrix y of zeros with x rows and x columns.

8ヶ月 前

解決済み

Find the nearest integer

Given a vector of integers and a real number find the closest integer. EX: >> a = [2 4 5 6 8 10]; >> b = 4.6; >> nea...

8ヶ月 前

解決済み

Insert zeros into vector

Insert zeros after each elements in the vector. Number of zeros is specified as the input parameter. For example: x = [1 ...

8ヶ月 前

解決済み

Find out next state (NS) of T Flip-Flop.

Find out next state (NS) of T Flip-Flop based on previous state (PS), inputs. Learn more about T Flip-Flop theory here: <htt...

8ヶ月 前

解決済み

Find the next state of a JK Flip-Flop

Find the next state (NS) of a JK Flip-Flop based on previous state (PS), inputs. Learn more about JK Flip-Flop theory here: ...

8ヶ月 前

解決済み

Who is the smartest MATLAB programmer?

Who is the smartest MATLAB programmer? Examples: Input x = 'Is it Obama?' Output = 'Me!' Input x = 'Who ?' Ou...

8ヶ月 前

解決済み

Free passes for everyone!

_Simply return the name of the coolest numerical computation software ever_ *Extra reward* (get a _freepass_): Once a mont...

8ヶ月 前

解決済み

Project Euler: Problem 10, Sum of Primes

The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below the input, N. Thank you <http:/...

8ヶ月 前

解決済み

Back to basics 22 - Rotate a matrix

Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

8ヶ月 前

解決済み

Project Euler: Problem 6, Natural numbers, squares and sums.

The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

8ヶ月 前

解決済み

Is my wife right? Now with even more wrong husband

Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

8ヶ月 前

解決済み

Higher! Lower!

My kids have started to play the "I'm thinking of a number between X and Y" game in the car on trips to and from their swim less...

8ヶ月 前

解決済み

Remove the air bubbles

Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...

9ヶ月 前

解決済み

~~~~~~~ WAVE ~~~~~~~~~

|The WAVE generator| Once upon a time there was a river. 'Sum' was passing by the river. He saw the water of the river that w...

9ヶ月 前