Solved


Find Rotated Substring
Given a string s1, find if a rotated version of s1 is present in a second string s2. For example, rotated version of some str...

meer dan 4 jaar ago

Solved


Code Wheel
Create a function that offsets each value in a given string by a given amount. For instance, codewheel('hello',1) s...

meer dan 4 jaar ago

Solved


Solving a quadratic equation
Given a, b ​​and c, Return the solution of the following quadratic equation: a*x^2 + b*x + c = 0.

meer dan 4 jaar ago

Solved


MinMax
* x=[2 4 3 1 6 4 6] * output , y=[1 6 2 4 3] here,y(1) is the minimum of x, y(2) is the maximum of x, y(3) is the 2nd mini...

meer dan 4 jaar ago

Problem


MinMax
* x=[2 4 3 1 6 4 6] * output , y=[1 6 2 4 3] here,y(1) is the minimum of x, y(2) is the maximum of x, y(3) is the 2nd mini...

meer dan 4 jaar ago | 1 | 32 solvers

Solved


Saving MATLAB session to a file
How to save MATLAB session to a file?

meer dan 4 jaar ago

Solved


Vectorizing, too easy or too hard?
Please insert a . before any ^, * or / in the string. That's it!!

meer dan 4 jaar ago

Solved


Find Sign(Zero Crossing) Changes in Array
Example; A = [1 2 3 -3 -4 -1 -24 2 4 -1 -2 3 1]; ans; [1 2 0 -3 -4 -1 0 2 0 -1 ...

meer dan 4 jaar ago

Solved


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

meer dan 4 jaar ago

Solved


Weave two matrices together to form one matrix
Take the first column from matrix a, then insert the first column from matrix b, and so on. For example: a = [1 2 3 4]; b ...

meer dan 4 jaar ago

Solved


Form a gaussian kernel using matrix size and sigma value
For example matrix = 3; sigma = 1.2; Gaussian kernel = [1 2 1; 2 2 2; 1 2 1]; ...

meer dan 4 jaar ago

Solved


How long does it take to run a bath?
Given the *volume flow rate* (volume/time) of a faucet and the *volume* of a bath tub, find the amount of time it takes to fill ...

meer dan 4 jaar ago

Solved


determine the sum of fraction part for given matrix
determine the sum of fraction part for given matrix a=1.8308 8.9172 6.7537 1.5853 10.2858 5.3804 6.5497 ...

meer dan 4 jaar ago

Solved


Zigzag of square matrix
find zigzag of square matrix in one dimension array a=[1 2 3;4 5 6;7 8 9]; should return b= [1 2 4 7 5 3 6 8 9]

meer dan 4 jaar ago

Solved


Minimum Maximum Sort Array
sort one array by put minimum value followed by maximum as follow a=[2 3 1 5] and the solution is y=[1 5 2 3 3 2 5 1];

meer dan 4 jaar ago

Solved


Is the test point on the line segment?
Given the [x,y,z] coordinates for the three points pa, pb, and pc, return true if the test point pc is on the line segment with ...

meer dan 4 jaar ago

Solved


design a magic matrix without using the command magic.
Like magic(4) = 16 3 2 13;5 10 11 8;9 6 7 12;4 15 14 1

meer dan 4 jaar ago

Solved


Make a logical diamond using GALLERY function
Inspired from <http://www.mathworks.com/matlabcentral/cody/problems/1078-make-a-diamond Problem 1078. Make a diamond> In thi...

meer dan 4 jaar ago

Solved


Matrix spiral
Make a spiral in a (n*n) matrix. The spiral has to start in the top left, and has to rotate clockwise to the center. The spiral ...

meer dan 4 jaar ago

Solved


Return a list sorted by number of consecutive occurrences
Inspired by Problem 38 by Cody Team. Given a vector x, return a vector y of the values in x sorted by the number of CONSECUTIVE...

meer dan 4 jaar ago

Solved


Spiral In
Create an m by n matrix filled with sequential integers starting from 1 and arranged in a counterclockwise spiral that hugs the ...

meer dan 4 jaar ago

Solved


Combinatorics - 01
* Input=[x,n] * where x is an array of numbers(or strings) and n is a +ve number. for example, x=[1,2] and n=6. The out...

meer dan 4 jaar ago

Problem


Combinatorics - 01
* Input=[x,n] * where x is an array of numbers(or strings) and n is a +ve number. for example, x=[1,2] and n=6. The out...

meer dan 4 jaar ago | 0 | 5 solvers

Solved


Creating a code via test suite :)
Given the test suites, create a code that would fit them :) *Clue: Pascal's Triangle

meer dan 4 jaar ago

Solved


Avengers Assemble!
Given matrix with so many zeroes, trim those zeroes and output a matrix joining all nnz elements Example: input = [0 0 0 0 0...

meer dan 4 jaar ago

Solved


I told you not separate me, but you did :( - ACDC
Given input vector, output it's DC and AC value Example: input = 0 1 -1 0 ac = 0 1 -1 0 dc = 0

meer dan 4 jaar ago

Solved


Refresh your system of equations
Given square matrix, and solution vector, find the values of the variables Example: xyz = [1 -1 2; 0 2 5; 4 0 -3]; //x-y+2...

meer dan 4 jaar ago

Solved


Modified run-length companion vector
Given a vector x, return a vector that indicates the run length of any value in x. Each element in output vector shows how many ...

meer dan 4 jaar ago

Solved


Encode Me From The Past
Given this input x = 2, 5, 1, 2, 4, 1, 1, 3 output should be (Five 2's, Two 1's, One 4, Three 1's) [2 2 2 2 2 1 1 4 1...

meer dan 4 jaar ago

Solved


Clipper Function
Create a function that emulates a clipper circuit Given sin wave, t and the constant value for clipping, and the direction to re...

meer dan 4 jaar ago

Load more