Feeds
已解决
Plotting Practice
Plot cos(x) vs x as shown in the figure below. Include the appropriate title, x-label, and y-label. Note, it is case sensitive. ...
2 months 前
已解决
How many Fibonacci numbers?
Find the number of unique Fibonacci numbers (don't count repeats) in a vector of positive integers. Example: x = [1 2 3 4...
2 months 前
已解决
Fibonacci-Sum of Squares
Given the Fibonacci sequence defined by the following recursive relation, * F(n) = F(n-1) + F(n-2) * where F(1) = 1 and F(1)...
2 months 前
已解决
Integer Sequence - II : New Fibonacci
Crack the following Integer Sequence. (Hints : It has been obtained from original Fibonacci Sequence and all the terms are also ...
2 months 前
已解决
Number of Even Elements in Fibonacci Sequence
Find how many even Fibonacci numbers are available in the first d numbers. Consider the following first 14 numbers 1 1 2...
2 months 前
已解决
Return fibonacci sequence do not use loop and condition
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: ...
2 months 前
已解决
Is this matrix orthogonal?
Given a square matrix, a, determine whether it is orthogonal. INPUT: a, a n x n matrix OUTPUT: true or false
2 months 前
已解决
Orthonormal matrix
You decide whether any given matrix is an orthonormal matrix or not. If each column in a matrix is perpendicular to the other...
2 months 前
已解决
Projector Matrix
Write a function to determine whether or not the matrix is a projector. Projector matrices are defined as P^2 = P.
2 months 前
已解决
compress sequence into intervals
You're given a row vector of monotonically increasing integers most of which are consecutive. Find the upper and lower bounds of...
2 months 前
已解决
remove single elements
Given a vector of integers, remove the elements that have appeared only once. The output elements should be in exact order as th...
2 months 前
已解决
Largest territory
Determine whose territory is largest. If there are multiple numbers tied for the largest territory, return the smallest number. ...
2 months 前
已解决
Three...is a magic number.
Yes it is... It's a magic number... To help you get rid of that earworm, here's a new Cody problem. You are given a squar...
2 months 前
已解决
Finding neighbors of [-1:1] in a matrix....
Hello All! Well I found this one fun to figure out, all you have to do is make a matrix of 1's or 0's (true or false) that sh...
2 months 前
已解决
Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...
6 months 前
已解决
sum of non-primes
The sum of the non-primes no larger than 10 is 1+4+6+8+9+10=38 Find the sum of all the positive non-prime integers that do no...
6 months 前
已解决
surrounded matrix
With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...
6 months 前
已解决
Given a number N, find the smallest prime P>N
Given a number N, find the smallest prime P greater than N. For example: If N=10 then P=11. If N=13 then P=17.
6 months 前
已解决
Area of a Square
Given the length x of the side of a regular square, find the area of the square, A.
6 months 前
已解决
area of an annulus
Given the diameter d of the inner circle of the annulus. Given length z of a chord of the outer circle of the annulus. This chor...
6 months 前
已解决
String Logic 19
Examples: 'DIG' --> 'I' 'IMPORTANT' --> 'MOTN' 'DEAL' --> 'EL' 'LIMB' --> 'IB' 'MOSTLY' --> 'OTY'
6 months 前
已解决
Find the next Fibonacci number
In the sequence of Fibonacci numbers, every number is the sum of the two preceding ones: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55...
6 months 前
已解决
Is X a Fibonacci Matrix?
In honor of Cleve's new blog and post: <http://blogs.mathworks.com/cleve/2012/06/03/fibonacci-matrices/> Is X a Fibonacci ...
9 months 前
已解决
Project Euler: Problem 10, Sum of Primes
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below the input, N. Thank you <http:/...
9 months 前
已解决
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...
9 months 前
已解决
Project Euler: Problem 4, Palindromic numbers
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 ...
9 months 前
已解决
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 = 9 + 16 ...
9 months 前
已解决
Parasitic numbers
Test whether the first input x is an n-parasitic number: <http://en.wikipedia.org/wiki/Parasitic_number>. ( _n_ is the second in...
1 year 前