A résolu


how to make the function use a default value when it wait for inputs for too long time ?
My function is using urlread() to get data from the web. however the internet is not so good and now and then there is no intern...

plus de 12 ans il y a

A résolu


Hard limit function
Classify x data as if x>=0 then y=1 if x<0 then y=0 Example x = [ -2 -1 0 1 2] y = [ 0 0 1 1 1]

plus de 12 ans il y a

A résolu


Matrix multiplication across rows
Given matrix m, return matrix n such that, rows of n are result of multiplication of the rows of the input matrix Example ...

plus de 12 ans il y a

A résolu


Project Euler: Problem 5, Smallest multiple
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smalle...

plus de 12 ans il y a

A résolu


Dealfun (1.0)
*Short description.* Write a function _dealfun_: [y1,y2,...,yn]=dealfun(fhandle,x1,x2,...,xn) which evaluates the f...

plus de 12 ans il y a

A résolu


Minimal cost
A power house, P, is on one bank of a straight river W meters wide, and a factory, F, is on the opposite bank L meters downstr...

plus de 12 ans il y a

A résolu


Slicing the cube
A bored matlab enthusiast has a cube with volume n^3. He decides to paint the entire surface of the cube red. Then, with slices...

plus de 12 ans il y a

A résolu


Rainbow matrix
Create a "rainbow matrix" as described in the following examples Input = 3 Output = [ 1 2 3 2 3 2 ...

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


How many rectangles in a grid ?
How many rectangles are there in an m × n grid ? For example, if m=1 & n=2, we have 3 rectangles.

plus de 12 ans il y a

A résolu


Delete the rows in the middle
We will delete the rows in the middle and keep the first and the last rows. For example if input is [1 2 1 7 1 8 ...

plus de 12 ans il y a

A résolu


Positive Infinity
Round the array a towards positive infinity

plus de 12 ans il y a

A résolu


Negative Infinity
Round the given array a towards negative infinity.

plus de 12 ans il y a

A résolu


Concatenate a successive power matrix in a column matrix
Generate F = [M1 M^2 ... M^p] with M a matrix, without using for.

plus de 12 ans il y a

A résolu


Polynomial Multiplication
Multiply two polynomial equation.Given polynomial coefficients a and b.

plus de 12 ans il y a

A résolu


Roots
Find out the roots of a given polynomial equation.Given are the coefficients of the equation.

plus de 12 ans il y a

A résolu


Evaluate Polynomial
Given a polynomial equation coefficients in a vector p, you have to return its value at x. Example: For inputs p and x ...

plus de 12 ans il y a

A résolu


Let's get back to school: create mixed numbered fraction
A fractional number can be represented as mixed number. A "mixed number" consists of an integer followed by a proper fraction...

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


Largest territory
Determine whose territory is largest. If there are two more large territory, determine a smaller number. For example, X ...

plus de 12 ans il y a

A résolu


Multiplication
Multiply two numbers in a different manner. The numbers are given to you as vectors x and y. Example x = [ 1 2 0 1 ] ...

plus de 12 ans il y a

A résolu


Distances in a circle
A circle (360°) is given and a row of 6 monotonic increasing numbers with the which difference from last to first value is les...

plus de 12 ans il y a

A résolu


Replace pattern 0 1 0 and 1 0 1
Find and replace a pattern in a row of zeroes and ones. * Find 1 0 1 and replace it with 1 1 1 * Find 0 1 0 and replace it w...

plus de 12 ans il y a

A résolu


Reverse within string
If input is a string 'yellow' the output should be 'leywol'. Locate the middle of the string and reverse the first (yel) and sec...

plus de 12 ans il y a

A résolu


Specific Element Count
Given a vector _v_ and a element _e_, return the number of occurrences of _e_ in _v_. Note: NaNs are equal and there may be n...

plus de 12 ans il y a

A résolu


Return unique values without sorting
If the input vector A is [42 1 1], the output value B must be the unique values [42 1] The *values of B are in the s...

plus de 12 ans il y a

A résolu


Half?
If you toss an even number (x) of coins, what is the probability (y) of 50% head and 50% tail?

plus de 12 ans il y a

A résolu


Geometric series
Find the sum, given the first term t1, the common ratio r, and number of terms n. Examples If input t1=1, r=1, n=7 the...

plus de 12 ans il y a

A résolu


Back to basics 13 - Input variables
Covering some basic topics I haven't seen elsewhere on Cody. Return as a string the name of the input variable to the functio...

plus de 12 ans il y a

A résolu


Project Euler: Problem 2, Sum of even Fibonacci
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...

plus de 12 ans il y a

Charger plus