Resuelto


"Find out the best cricket"
This is how I originally read Problem 2013, so let's just go with it. Give me the first and last name of the best cricket, rega...

casi 11 años hace

Resuelto


Matlab Basics II - squares
Write a function that takes matrix A, and squares each element in the matrix example: A = [1 2 3] output = [1 4 9]

casi 11 años hace

Resuelto


Split a string into chunks of specified length
Given a string and a vector of integers, break the string into chunks whose lengths are given by the elements of the vector. Ex...

casi 11 años hace

Resuelto


Find the elements of a matrix according to a defined property.
From A = [5,2,3] and B = [1,2,3,4,5,6,7,8,9,10] produce a vector C where : C(1) is the sum of the first A(1) elements of B, ...

casi 11 años hace

Resuelto


Find the maximum number of decimal places in a set of numbers
Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not coun...

casi 11 años hace

Resuelto


Simple return on investment
Assume you have some money and want to invest all your money to stock market. You randomly select a stock and invest all your mo...

casi 11 años hace

Resuelto


Determine the length of a string of characters
Determine the length of a string of characters

casi 11 años hace

Resuelto


Convert Two Character String into a Binary Vector
Given a string "XOXXO" convert it into a binary vector. [1 0 1 1 0] Paul Berglund implemented an optimal method in <http://ww...

casi 11 años hace

Resuelto


Find the maximum two numbers of every column of a matrix
Find the maximum two numbers of every column of a matrix. Example: If we input a matrix A = [ 1 2 4 6 0 3 ...

casi 11 años hace

Resuelto


Find the area of the four walls
If length, breadth and height of the walls are given, find the area of the four walls.

casi 11 años hace

Resuelto


index of n in magic(n)
let input=5; magic matrix 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 ...

casi 11 años hace

Resuelto


Matlab Basics II - Intervals
Write a function that takes an interval from a to b, and divides it into 5 parts example: a = 1, b = 2 output = 1 1.25 ...

casi 11 años hace

Resuelto


Matlab Basics - Logical Tests I
Write a script to test whether a year number is for a leap year or not. eg. x = 1884 output = 1 eg. x = 3 output = 0

casi 11 años hace

Resuelto


Project Euler: Problem 3, Largest prime factor
The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number being input, input might be ui...

casi 11 años hace

Resuelto


Make a Star Pyramid
Create a star pyramid. First line will have 1 star, second will have two stars and so on... a basic program which is easily done...

casi 11 años hace

Resuelto


Matlab Basics II - Free Fall
An object freely falling from rest under gravity covers a distance x given by: x = 1/2 gt^2 write a function that calculat...

casi 11 años hace

Resuelto


Put Two 1D matrices into one 1D matrix
Example: If input a = [1 2 3 4 5]; input b = [10 9 8 7 6]; then output will be, y_correct = [1 10 2 9 3 8 4 7 5...

casi 11 años hace

Resuelto


Find the position of first minimum value in an integer array with numbers
If x = [2 6 4 9 10 3 1 5 1] the the output should be 7, because the first minimum value (1) lies at the 7th position.

casi 11 años hace

Resuelto


Matrix rotation as per given angle
Given a user defined matrix and angle of rotation, rotate the elements of output matrix as clockwise or anti-clockwise. Angle wi...

casi 11 años hace

Resuelto


Integer or Float?
Test an input to see whether it is an integer or a floating point number. If it is an integer return 1 for 'true'. Otherwise ret...

casi 11 años hace

Resuelto


Pull the variable y_correct from the Caller's Workspace
*Description* This highlights a very easy to use and high-scoring cheat that can be used on almost all Cody questions.

casi 11 años hace

Resuelto


Implement a counter
Write a function that returns a function that counts the number of times it is invoked. Example: >> h = counter; >> h() ...

casi 11 años hace

Resuelto


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

casi 11 años hace

Resuelto


Guess Cipher
Guess the formula to transform strings as follows: 'Hello World!' --> 'Ifmmp Xpsme!' 'Can I help you?' --> 'Dbo J ifmq zpv...

casi 11 años hace

Resuelto


Subtract two positive numbers
Given a and b as a string, return b-a without using string to number conversion functions. a and b must to be a same size and b ...

casi 11 años hace

Resuelto


Array GCD
* Find Greatest Common Divisor in a given array * Function Template: function ans = arraygcd(a) % a=[45 15 200 ...

casi 11 años hace

Resuelto


Wheat on a chessboard pt 1
If a chessboard were to have wheat placed upon each square such that one grain were placed on the first square and each successi...

casi 11 años hace

Resuelto


Palindrome Check
Check whether the entire matrix is palindrome or not. Example matrix = [7 8 7] matrix_reverse = [7 8 7] So the mat...

casi 11 años hace

Resuelto


Let's get back to school, and create multiplication tables
For a given range, create multiplication tables. (start is always < endno) Example start = 17 endno = 19 Then, ...

casi 11 años hace

Resuelto


Wilf-Zeilberger pairs
Take as inputs two functions _F_ and _G_, and two scalar values _n_ and _k_. Test whether the functions are candidates to be a W...

casi 11 años hace

Cargar más