A résolu


Sequence Vectorization - I
Given a Natural number N, return the sequence - [1 1 2 1 2 3 1 2 3 4 ... 1 2 3 ... N-3 N-2 N-1 N] i.e. the horizontal concatenat...

9 jours il y a

A résolu


Rotate a matrix without using rot90
rotate the input square matrix by certain degrees (e.g. 270 or 450 etc.) without using rot90 or flip function. its an extension...

9 jours il y a

A résolu


Guess the Coefficients!
Given a polynomial p known to have positive integer coefficients, deduce the values of the coefficients. For example: p = ...

9 jours il y a

A résolu


Solve an ODE: draining tank
Write a function to compute the time to drain a cylindrical tank of diameter from an initial level to a level . The outflow oc...

9 jours il y a

A résolu


Fast 1-D Convolution (valid shape)
Pursuant to the first problem in the <http://www.mathworks.com/matlabcentral/cody/?term=Fast+1-D+Convolution fast 1-D convolutio...

9 jours il y a

A résolu


Compute the sum of reciprocals of quadratics
Write a function to compute the following sum: See also Cody Problem 46000.

9 jours il y a

A résolu


Vector multiplication
Given two row vectors, v1 and v2, each representing an integer, such that the vector elements are the digits from left to right,...

9 jours il y a

A résolu


Change the sign
Given a matrix x, return one with each diagonal element replaced by its absolute value and the largest element in absolute value...

9 jours il y a

A résolu


ZigZag - 05
Given a matrix, print all its elements in the alpha form. For example - a=[16 2 3 13 5 11 10 8 ...

9 jours il y a

A résolu


Logic 12

9 jours il y a

A résolu


Miles to go before I sleep
Recently, my car's odometer passed 56789. Given an odometer reading, output how many miles need to be driven to get the next mi...

9 jours il y a

A résolu


Convert Decimal Number to Hex number (including non integer value)
Convert Decimal Number to Hex number (including non integer value) E.X. (2598.675) in decimal = A26.ACCC in hexa

9 jours il y a

A résolu


No of squares in a grid
given a m*n grid calculate the no of possible squares & rectangles on that grid. output: y=[no of rectangles , no of sqa...

9 jours il y a

A résolu


Go-style solver
Consider a variation of the game Go where one player has gone ahead and placed several pieces all at once. Assuming that the sec...

9 jours il y a

A résolu


Hangman (easy)
What is the best letter to start a <http://en.wikipedia.org/wiki/Hangman_(game) hangman> game with? You are given a cell arra...

9 jours il y a

A résolu


Angles of the hands of a clock
For this problem, consider an analog (or at least continuous digital representation) of a clock. Our clock is a 12 hour clock w...

9 jours il y a

A résolu


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

9 jours il y a

A résolu


Cut the rod
A rod of length n can be cut in different sizes. Different price is associated with different length of cuts. length, len= [1,...

9 jours il y a

A résolu


The Google Interview: Two Eggs Problem
Consider the following problem, a popular Google interview question: A firm has invented a super-strong egg. For publicity pu...

9 jours il y a

A résolu


Get Next Combination
Return next combination For example three-element combinations of 1:5 1 2 3 1 2 4 1 ...

9 jours il y a

A résolu


Can't wait for NewYear ball drop !
Given an input string of the form 'yyyy-mm-dd' or 'yyyy-mm-dd hh:mm:ss', return a string message indicating how many days, hours...

9 jours il y a

A résolu


Back to basics - array operations
Without performing actual arithmetic operations on arrays, return feasibility of operation as true or false. True if given opera...

9 jours il y a

A résolu


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

9 jours il y a

A résolu


Multiply 2 numbers
Very easy, you just have to multiply 2 numbers but you cannot use the following signs (*, /, - ,^) ,mtimes , times, cross, pro...

9 jours il y a

A résolu


Raise Matrix to Power
For a given square matrix x and scalar a, find x^a without using '^' or 'mpower'.

9 jours il y a

A résolu


Successive zeros
Suppose n is the number of digits a number contains. Now, 12032 - is a valid n=5 digit number. But 10023 - is defined as i...

9 jours il y a

A résolu


Minimize a quadratic function
Write a function to minimize the function . The coefficients a, b, and c will be positive. Give the coefficients in a vector coe...

9 jours il y a

A résolu


Secure Password
You are joining the MATLAB Central platform to solve a question on Cody. The signup page, requires you to input an id and a pass...

9 jours il y a

A résolu


Find out DC Gain of transfer function
Find out DC Gain of transfer function Example, G(s)=5/ (s+2), then DC gain is 2.5 (put s=0)

9 jours il y a

Charger plus