Resuelto


Polygonal numbers
The task of <http://www.mathworks.co.uk/matlabcentral/cody/problems/5 Problem 5> is to calculate triangular numbers. By playing ...

más de 10 años hace

Resuelto


Integer Sequence - II : New Fibonacci
Crack the following Integer Sequence. (Hints : It has been obtained from original Fibonacci Sequence and all the terms are also ...

más de 10 años hace

Resuelto


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

más de 10 años hace

Resuelto


Create the following sequence : 0 1 1 4 9 25 64 169 ...
The sequence 0, 1, 1, 4, 9, 25, 64, 169, ... represents the square of the sequence of Fibonacci numbers. Let n repres...

más de 10 años hace

Resuelto


Given a number find two variables
If the input is *x*, find *a* and *b* from the following equation: *x = a*2^b*. Hint: *b* is an integer while *x* and *a* ar...

más de 10 años hace

Resuelto


Compute the dilation of a binary image
A basic operation in image analysis is the dilation. Given an image where each pixel is either on or off (black/white, true/fals...

más de 10 años hace

Resuelto


Rank of magic square (for beginners)
Compute the rank r of a magic square of order n WITHOUT rank and magic functions.

más de 10 años hace

Resuelto


Measure a Special Distance
Given an n-by-2 matrix with positive and negative numbers, return an n-by-n matrix in the manner of the function template.

más de 10 años hace

Resuelto


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

más de 10 años hace

Resuelto


Which way to go?
Given an m*n grid, How many ways are there to go from upper left corner to the lower right one? You can only move right...

más de 10 años hace

Resuelto


If you prick us, do we not bleed?
While doing some quick sewing to fix up your child's Halloween costume, you accidentally jab your finger with the needle. Refle...

más de 10 años hace

Resuelto


Moore-Penrose pseudoinverse of matrix
Find the command for Moore-Penrose pseudoinverse of matrix and solve

más de 10 años hace

Resuelto


Divide elements by sum of elements
In this problem, I ask you to write a function which will divide the elements of each column by the sum of the elements of the s...

más de 10 años hace

Resuelto


Distance a ball travels after throwing vertically
Calculate the total distance *'d'* (in meters) a ball would travel after *'s'* seconds and starting velocity of *'v'* (in m/s). ...

más de 10 años hace

Resuelto


Implement a bubble sort technique and output the number of swaps required
A bubble sort technique compares adjacent items and swaps them if they are in the wrong order. This is done recursively until al...

más de 10 años hace

Resuelto


A Poker Hand
Texas Hold ‘Em is a classical card game. In this problem, we are concerned with determining the probability of attaining a certa...

más de 10 años hace

Resuelto


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

más de 10 años hace

Resuelto


Numeric array to cell array of strings (easy)
Given a numeric array (A) and a 1xk cell array of strings (C), return a cell array (B) that is the same size as A and in which e...

más de 10 años hace

Resuelto


Path of least resistance
Find the length of the shortest path through the matrix from the top left to bottom right corner. You may move right, down, or d...

más de 10 años hace

Resuelto


Polynomial Evaluation
Create a routine that takes a list of coefficients of a polynomial in order of increasing powers of x; together with a value of ...

más de 10 años hace

Resuelto


Matrix of almost all zeros, except for main diagonal
Write a program to input an integer n and build a n-by-n matrix with the numbers 1,2,...,n on the main diagonal and zeros elsewh...

más de 10 años hace

Resuelto


Model a falling body
An object is falling freely from a height of 22 meters under the force of gravity. <<http://blogs.mathworks.com/images/seth/c...

más de 10 años hace

Resuelto


unique with nan
input x = [2 NaN 3 5 NaN; 1 NaN 4 9 NaN; 8 -2 7 6 -2; 7 4 8 5 4]; output y_correct = [2 ...

más de 10 años hace

Resuelto


longest sequence of nans
In an array return the length of longest sequence of nans for each column. x = [ 2 3 1 2 5 6; nan nan 5 n...

más de 10 años hace

Resuelto


Converting Decimal to Binary
Given a decimal number that may include a fractional component, convert it into binary representation. The numbers you are given...

más de 10 años hace

Resuelto


Determine the full width at half max
Determine the full width at half max of a curve. The full width at half maximum (FWHM) is a parameter which is used for desc...

más de 10 años hace

Resuelto


List of built-in demo images
Return a cell array containing the filenames for built-in images (e.g. cameraman.tif, coins.png). An optional input specifies wh...

más de 10 años hace

Resuelto


Longest Collatz Sequence
Inspired by Projet Euler n°14. The Collatz iterative sequence (See Cody problem n° 2103 and 211) is defined for the set of po...

más de 10 años hace

Resuelto


execute the declaration in strings and return value
execute the commands in strings and return value input='a=23' output=23

más de 10 años hace

Resuelto


Create cell array of strings
Convert the input to a cell array, but only if necessary. If the input is a string, return a 1-by-1 cell array containing the...

más de 10 años hace

Cargar más