Answered
How do I remove elements of an array from another array?
Try this - r1=[];r2=[]; for k = 1:size(allpoint_i,1) countP = ismember(Pp, allpoint_i(k,:),'rows'); sumP(k) = sum(c...

4 years ago | 0

| accepted

Solved


Data decompression
A chunk of data is to be 'decompressed'. Input: * compressed: a row vector of uint8 values. This is the compressed data. ...

4 years ago

Solved


Check if vertices form a rectangle
Given a set of 4 vertices defined by vectors X and Y, return true if the vertices form a rectangle and false otherwise. X and Y...

4 years ago

Answered
matlab plot for non separable function
syms x y fimplicit(sin(x*y)+y+2==0)

4 years ago | 3

| accepted

Solved


Do the line-segments intersect?
You are given two line segments. Do they cross? Consider one segment as (x1,y1) to (x2,y2), the other segment as (x3,y3) to (...

4 years ago

Solved


Crossing to Kissing - Untangle the Lines
Turn lines that cross into lines that kiss. You will be given two lines that cross at some point. Your job is to untangle the...

4 years ago

Solved


Ordinal numbers
Given an integer n, return the corresponding ordinal number as a character string. For example, ord(1)='1st' ord(2)=...

4 years ago

Solved


Find the biggest empty box
You are given a matrix that contains only ones and zeros. Think of the ones as columns in an otherwise empty floor plan. You wan...

4 years ago

Solved


Number of digits in an integer
Specifies how many digits in a given integer. Example: in=100 ==> out=3

4 years ago

Solved


Temperature Conversion Utility (Strings)
This is a follow-on problem to <http://www.mathworks.com/matlabcentral/cody/problems/2413-temperature-conversion-utility Problem...

4 years ago

Solved


Encode Roman Numerals
Create a function taking a non-negative integer as its parameter and returning a string containing the Roman Numeral representat...

4 years ago

Solved


Redefine the Array if the Elements in the Array are Repeating
Check if the Array has any repeating elements, if there are repeating elements then choose "n" as a number of times you want tha...

4 years ago

Solved


Bernoulli's Equation
Bernoulli's equation states that for an incompressible fluid the following summation is constant across the flow: v^2/2 + g*z + ...

4 years ago

Solved


Find the gcm of n given values
Create a function that given n integer values greater than zero, finds the two numbers with the greatest common divisor and retu...

4 years ago

Solved


Construct the Seidel-Entringer-Arnold triangle
Several problems in Cody ask us to construct part or all of triangles in which entries follow a pattern. Cody Problems <https://...

4 years ago

Answered
Partial Differentiation of a function with exponential is different from other calculators
There's nothing wrong with your answer, it's just simplified version of it. 2 from numerator and denominator is cancelled out an...

4 years ago | 2

| accepted

Solved


Regex match
Many regular expression engines have a simple function to quickly know whether a regular expression entirely matches a string or...

4 years ago

Solved


Count the peaceful queens
In a 5x5 chessboard with a queen of one color (white, say) on the perimeter, one can place 12 black queens on the board such tha...

4 years ago

Solved


Breaking Out of the Matrix
Do you want to take the Red Pill, or the Blue Pill? If you take the Blue Pill, you will simply pass along to the next problem...

4 years ago

Solved


Determine whether a number is practical
A number is practical if all smaller numbers can be written as a sum of the proper divisors of . The number 24 is practical bec...

4 years ago

Solved


Squares in Squares - Concentric Squares
Given a number, n, create an n x n sized matrix with concentric squares of 1s from the outside in. There should be a gap between...

4 years ago

Solved


Find similar sequences
Another problem inspired by a question on the <http://www.mathworks.com/matlabcentral/answers answers> forum. Given a matrix ...

4 years ago

Solved


geometric progression
I've modified my <http://uk.mathworks.com/matlabcentral/cody/problems/2800-arithmetic-progression previous program> so that it n...

4 years ago

Solved


arithmetic progression
I've written a program to generate the first few terms of <https://en.wikipedia.org/wiki/Arithmetic_progression arithmetic progr...

4 years ago

Solved


Generate the Figure-Figure sequence
After discussing Scott Kim’s FIGURE-FIGURE Figure (below) in Gödel, Escher, Bach, Douglas Hofstadter introduced an integer seque...

4 years ago

Answered
changing timestamp t and plotting the results.
I am not sure if pause works here on the online/live editor, but it works nicely offline. %building on Torsten's code n=5; dt...

4 years ago | 0

Answered
adding a variable into a vector
Your deltax is incorrectly defined and due it all subsequent calculations are incorrect as well. %It should be L=0.8; gridpoi...

4 years ago | 1

Solved


Project Euler: Problem 9, Pythagorean numbers
A Pythagorean triplet is a set of three natural numbers, a b c, for which, a^2 + b^2 = c^2 For example, 3^2 + 4^2 =...

4 years ago

Answered
How to return values mapped to a variable?
Not sure what you want exaclty a = [1 2 3 4 5 6 7 8 9 10]; b = [4 5 12 45 21 52 69 10 22 0]; a_temp = isprime(a) b_temp = b(...

4 years ago | 0

Solved


perfect square
Perfect square is amazing, so we have problems like 45183, 34482, 44683, and 44957. But how can we find a large number is a pe...

4 years ago

Load more