Risolto


Replace May with April
For instance, if the input is input_str = 'The flowers may bloom in April'; then the output is output_str = 'The flo...

oltre 10 anni fa

Risolto


Back to basics 15 - Benchmark
Covering some basic topics I haven't seen elsewhere on Cody. Return an array of the benchmark values for MATLAB.

oltre 10 anni fa

Risolto


Make a 1 hot vector
Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...

oltre 10 anni fa

Risolto


Cannon Ball
Given g (acceleration due to gravity) and desired altitude x, find the minimum ground velocity of a cannon ball to reach x.

oltre 10 anni fa

Risolto


Spot the outlier
All points except for one lie on a line. Which one is the outlier? Example: You are given a list of x-y pairs in a column ...

oltre 10 anni fa

Risolto


Matrix with different incremental runs
Given a vector of positive integers a (>=0); How does one create the matrix where the ith column contains the vector 1:a(i) poss...

oltre 10 anni fa

Risolto


Are all the three given point in the same line?
In this problem the input is the coordinate of the three points in a XY plane? P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) how can...

oltre 10 anni fa

Risolto


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


Who invented zero?
We know the importance zero in computer science, mathematics... but who invented zero? Clue: He was the first in the line ...

oltre 10 anni fa

Risolto


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

oltre 10 anni fa

Risolto


Average of square wave
given positive and negative peak , calculate dc level, 50% duty cycle

oltre 10 anni fa

Risolto


Negative matrix
Change the sign of all elements in given matrix.

oltre 10 anni fa

Risolto


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

oltre 10 anni fa

Risolto


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

oltre 10 anni fa

Risolto


Transpose
Write a MATLAB script in order to convert a random length row vector (v) into a column vector.

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


Add a row of zeros on top of a matrix
Given a matrix, insert a row of zeros as the top row.

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


Magic!
Check whether the input matrix is a normal magic square: <http://en.wikipedia.org/wiki/Magic_square> Output the logical va...

oltre 10 anni fa

Risolto


QWERTY coordinates
Given a lowercase letter or a digit as input, return the row where that letter appears on a <http://en.wikipedia.org/wiki/Keyboa...

oltre 10 anni fa

Risolto


give nth decimal place of pi
max 15th place after the decimal point is ok for now

oltre 10 anni fa

Risolto


Who knows the last digit of pi?
There is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can ...

oltre 10 anni fa

Risolto


Convert a vector into a number
This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

oltre 10 anni fa

Risolto


Scrabble Scores
Given a word, determine its score in <http://en.wikipedia.org/wiki/Scrabble Scrabble>. The input string will always be provide...

oltre 10 anni fa

Risolto


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

oltre 10 anni fa

Risolto


Duplicates
Write a function that accepts a cell array of strings and returns another cell array of strings *with only the duplicates* retai...

oltre 10 anni fa

Risolto


The Goldbach Conjecture, Part 2
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

oltre 10 anni fa

Risolto


Sums with Excluded Digits
Add all the integers from 1 to n in which the digit m does not appear. m will always be a single digit integer from 0 to 9. no...

oltre 10 anni fa

Carica altro