Solved


Find the Fourier coefficients of a periodic function
For the a given periodic function, f, calculate the first N Fourier coefficients. The inputs to your function must be one period...

4 years ago

Solved


Find all prime factors of the input
Given an input x, find its all prime factors. Return the vector with all factors in ascending order. Efficiency is the key here...

4 years ago

Solved


Castling-03
Given the position of different chess pieces on the chessboard, figure out whether castling is valid or not in the next move (wh...

4 years ago

Solved


Castling-02
This is a follow up of problem <https://www.mathworks.com/matlabcentral/cody/groups/1/problems/45329-castling-01> Given...

4 years ago

Answered
I don't want to draw the lines between the errorbar
%random data x = 1:10:100; y = [20 30 45 40 60 65 80 75 95 90]; err = [4 3 5 3 5 3 6 4 3 3]; errorbar(x,y,err,'.', 'MarkerEd...

4 years ago | 1

Solved


Number generator
In this problem, a number will be given. starting with the first digit, keep on adding all subsequent digits till the state (...

4 years ago

Solved


Checkmate-02
This is an extension of the problem <https://www.mathworks.com/matlabcentral/cody/problems/45238-checkmate> If the king is in...

4 years ago

Answered
how to take average of every 10 rows in one column?
Assuming you mean average of rows in pairs (1-10, 11-20, 21-30) %random data y=rand(30750,1); %30750x1 data z=reshape(y,10,[]...

4 years ago | 1

Solved


Find Min and Max Differences in a Vector
Given an array of integers, return the absolute largest and smallest (non zero) difference between any two numbers in the array....

4 years ago

Solved


Sum of 2 numbers in array
Given an array and a target sum, return true if any 2 numbers in the array sum up to the given target sum. Both numbers cannot h...

4 years ago

Solved


determine skid distance of car
Determine the distance a car skids to a stop given initial velocity (v) and time (t).

4 years ago

Solved


Castling-01
Given the position of only one player's chess pieces(some of them) on the chessboard, figure out whether castling is valid or no...

4 years ago

Solved


Queen's move - 02
In continuation with the problem-45236 ... In the previous problem, it was assumed that there were no other chess pieces on th...

4 years ago

Solved


Minimum number of children to distribute unequal cookie portions
A cruel parent wants to distribute N cookies such that it is impossible for every child to receive the same number of cookies. W...

4 years ago

Solved


Nth Order Polynomial Regression
Inputs: -two vectors x and y (row or column) -order of polynomial, p Outputs: -vector of coefficients [b0 b...

4 years ago

Answered
Create a structure of a field in the workspace
You are overwriting numeric values (double precision) with struct values. That is not allowed and hence the error. If all your ...

4 years ago | 0

| accepted

Answered
Calculating roots of an equation in Matlab.
Some slight tweaks I used vpasolve cause symbolic solver will give an error and will return the answer using vpasolve only. De...

4 years ago | 0

| accepted

Solved


Sort Non-zeros
Consider 0s in a vector creates a break-point. sort all the sub-arrays created by those break points. For example, a = [3, 4, 1...

4 years ago

Solved


Chain multiplication - 01
Say, you are given two matrices - A (shape= 3*4) and B(shape = 4*5). If you multiply these two matrices, the resultant matrix w...

4 years ago

Solved


Multiply binary numbers
Write a function to multiply two binary numbers input as strings. For example, input values of ‘1011’ and ‘101’ should give ’110...

4 years ago

Solved


Nuemann Polynomials
Return the coefficients of nth (n>=0) Nuemann polynomial, (a sequence in 1/t) as polynomials in alpha. The expected output is a...

4 years ago

Solved


Number of leaps in binary search
Binary search is one of the most popular searching algorithms (Binary Search Algorithm). It works only in a sorted array. It uti...

4 years ago

Solved


Bang Bang in Bangalore
Imagine a strange language disorder, Bangolangosis, has developed among trigonometricians of <http://en.wikipedia.org/wiki/Banga...

4 years ago

Solved


Fill-a-pix - Solution Checker
<http://www.conceptispuzzles.com/index.aspx?uri=puzzle/fill-a-pix/rules Fill-a-pix> is a logic puzzle game similar to Pic-a-Pix ...

4 years ago

Solved


Tic Tac Toe Solver
Create a function that checks n number of tic tac toe boards housed in a 3x3xn matrix where the x's are represented as 1's (and ...

4 years ago

Solved


Geometry: Find Circle given 3 Non-Colinear Points
*This Challenge is to determine the center and radius of a circle given three non-colinear points.* *Input:* Points *Outpu...

4 years ago

Solved


Minimum Distance Point to Segment
This Challenge is to determine the minimum distance from a 2-D line segment defined by two points to a point. The point is (p...

4 years ago

Solved


Spiral Out - 02
An array is given. Convert it into a spiral matrix. For example, a=1:27; out=[21 22 23 24 25 26 20 ...

4 years ago

Solved


English to Pig Latin Translator
Pig latin is a faux-language based off of English. The rules are as follows (excerpted from the wikipedia entry for Pig Latin): ...

4 years ago

Solved


Compress strings (not springs)
Please remove excess space, limit one space between others, and no space before punctuation marks. * For example, 'Trendy , ...

4 years ago

Load more