Solved


make histogram
You probably know the function hist(x,n) to get the histogram. Now try to write the function yourself! For the cheaters wanting...

2 mesi ago

Solved


Flip the diagonal values
Write a program that flip the elements of main diagonal , upper and lower diagonal values of a sqare matrix. For example if a ...

2 mesi ago

Solved


Float like a cannonball
Given gravity on earth (g=9.81 [m/s/s]) find the distance s [m] by a cannonball propelled at a speed of u [m/s] from the origin ...

2 mesi ago

Solved


Find the right x in a 1. order Polynomal (y = m*x+c)
Given two points in a Cartesian coordinate system, find the x-value, where polynomial of 1. order (y = m*x+c) is equal to a giv...

2 mesi ago

Solved


Spiral Matrix
for a given integer n>=3, generate a matrix of nxn such that the value n^2 is at bottom left and its decreasing towards center ...

2 mesi ago

Solved


Generalized Fibonacci
The Fibonacci sequence is defined as: Fib(1) = 0 Fib(2) = 1 Fib(N) = Fib(N-1) + Fib(N-2) The Fibonacci sequence ca...

2 mesi ago

Solved


Form Blocks in a 1D array
Lets say I have an array of size (10,1); I want to divide it into the num number of blocks which are given by user no_of_b...

2 mesi ago

Solved


Number of lattice points within a circle
Find the number of points (x,y) in square lattice with x^2 + y^2 =< n. This is related to Jame's <http://www.mathworks.com/matla...

2 mesi ago

Solved


Five Fingers
A little girl has just learnt how to count from 1 to N using the five fingers of her left hand as follows. She starts by calling...

2 mesi ago

Solved


Insert certain elements into a vector.
We start with vector V. Some values W will be inserted into V, at positions U. Say, |V| contains |[1 2 3 4 5]| and |W| is |[0...

2 mesi ago

Solved


Get input and output variable names
Given a string representing a function header, return the variable names used for the inputs and outputs. For example if input ...

2 mesi ago

Solved


Siren frequency and Doppler effect.
The Doppler effect is described on OpenStax University Physics at https://openstax.org/books/university-physics-volume-1/pages/1...

2 mesi ago

Solved


Find names/words that start and end with the same letter.
Find names/words (from a string) that start and end with the same letter. * Case-insensitive. * If a name/word is not at the...

2 mesi ago

Solved


Soccer - TOTO
How many different outcomes are there in a soccer-TOTO with n games? For each game there are three results: win - loss - equa...

2 mesi ago

Solved


Simple Past of Regular Verbs
Given a regular verb, return the simple past. Example Input verb = 'to work' Output simple_past = 'worked'

2 mesi ago

Solved


What is Title of Cody Challenge 42?
Given a Cody Challenge number return its Title. *Input:* Cody Challenge Number *Output:* Title of the Cody Challenge ...

2 mesi ago

Solved


Kurchan 3x3 - Optimal Score
Find an optimal 3x3 Kurchan square, score of 198. A 3x3 Kurchan square has values 1:9.The products of each row, column, diag...

2 mesi ago

Solved


Script file size
Determine the file size of a script, "function.m". This is the base scoring method for Cody and the Matlab Contests. A met...

2 mesi ago

Solved


Magic - Faro Shuffle
The Faro shuffle is the perfect interweaving of cards. Quiz: How many Faro's returns a standard 52 deck to its start? Fifty fo...

2 mesi ago

Solved


Fifteen Parity Check
The Matlab function fifteen initializes the 4x4 array with randperm(16), which produces 50% unsolvable puzzles. A <https://en.wi...

2 mesi ago

Solved


Operate on matrices of unequal, yet similar, size
You may want to add a vector to a matrix, implying that the vector is added to each column of the matrix. Or multiply a 3x4x5 ma...

2 mesi ago

Solved


Pandigital Factors (Based on Euler 491)
A Pandigital Number is a number containing all of the digits from 0-9 inclusive, with the added stipulation that it does not hav...

2 mesi ago

Solved


Check if it is a square or cube of consecutive numbers
Check whether the element of given row vector is a square or cube of consecutive numbers. For example Input x=[4 27 16 25 ...

2 mesi ago

Solved


A sequence of Ones
You are given number(s) with all digits - 1. Your answer will depend on the count of 1 in the given number, for example - x1...

2 mesi ago

Solved


Create a function that adds one to a number
ex: x = 1 y = 2

2 mesi ago

Solved


create a function that cubes a number
example: x = 3 y = 27

2 mesi ago

Solved


Clockwise or Counterclockwise
Given a list of 2-d points defining the vertices of a polygon, determine whether these points are sorted clockwise. The input...

3 mesi ago

Solved


Best Fit RMS
Given a set of data as x and y, find the <http://en.wikipedia.org/wiki/Root_mean_square RMS> value between the data and its best...

3 mesi ago

Solved


Create a v-notch vector without "sort" function
Given a vector vec, create a v-shaped vector as shown below: vec = [ 10 2 3 89 5 7 90 0 12] Output vector = [90 89 12 10 7 5 3 ...

3 mesi ago

Solved


Sales Prediction
Miss X is a shopaholic person and every weekend she goes to a mall. There are total of 10 shops. Miss X starts from shop #1 and ...

3 mesi ago

Load more