Risolto


Knight's Tour Checker
Given a matrix a, determine whether or not a legal <http://en.wikipedia.org/wiki/Knight's_tour knight's tour> is present. The kn...

12 mesi fa

Risolto


Longest Divisor Run
Given the vector a, find the longest run of consecutive numbers that can be evenly divided by the same number d where d > 1. ...

12 mesi fa

Risolto


Kaprekar Steps
6174 is the Kaprekar constant. All natural numbers less than 10,000 (except some with same digits) can be reduced to 6174 in the...

12 mesi fa

Risolto


Sum of series
a(n) = n^2 - (n-1)^2 find the summation of the series upto n i.e. a(1)+a(2)+...+a(n)

12 mesi fa

Risolto


Matlab Basics - Switching Assignments
Switch assignments for variables x and y, for example start with x = 1 and y = 3 end with y = 1 and x = 3 Do NOT simply r...

12 mesi fa

Risolto


Draw a '3' in a zero matrix!

12 mesi fa

Risolto


Octoberfest festival
A group of students decided to visit Octoberfest festival. First they ordered one beer, then after half-hour they taken one more...

12 mesi fa

Risolto


Sum of series VI
What is the sum of the following sequence: Σk⋅k! for k=1...n for different n?

12 mesi fa

Risolto


Compute Fibonacci Number
Compute the n-th Fibonacci Number f(0) = 0, f(1) = 1, f(2) = 1, f(3) = 2, ... f(42) = 267914296

12 mesi fa

Risolto


Draw a '6' in a zero matrix!

12 mesi fa

Risolto


Draw 'E'
Draw a x-by-x matrix 'E' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 1 1 0 0 0 0 ...

12 mesi fa

Risolto


All capital?
Are all the letters in the input string capital letters? Examples: 'MNOP' -> 1 'MN0P' -> 0

12 mesi fa

Risolto


Counting Sequence
Given a vector x, find the "counting sequence" y. A counting sequence is formed by "counting" the entries in a given sequence...

12 mesi fa

Risolto


(Linear) Recurrence Equations - Generalised Fibonacci-like sequences
This problem is inspired by problems <http://uk.mathworks.com/matlabcentral/cody/problems/2187-generalized-fibonacci 2187>, <htt...

12 mesi fa

Risolto


Back to basics 7 - Equal NaNs
Covering some basic topics I haven't seen elsewhere on Cody. Given 2 input variables, output true if they are equal, false ot...

12 mesi fa

Risolto


Find the largest number
Find the largest number |x| among 4 numbers given as variables |a|, |b|, |c|, and |d|. Example: Input: a = 4; b = 7; c ...

12 mesi fa

Risolto


Sum of series III
What is the sum of the following sequence: Σ(2k-1)^3 for k=1...n for different n?

12 mesi fa

Risolto


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

12 mesi fa

Risolto


Narcissistic number ?
Inspired by Problem 2056 created by Ted. In recreational number theory, a narcissistic number is a number that is the sum of ...

12 mesi fa

Risolto


NO _________ ALLOWED....
So you're given a sentence where if there is a particular word in the sentence then the output is 1, if it is not there then the...

12 mesi fa

Risolto


Sum of diagonals elements of a matrix
Given a matrix, return the sum of all the elements across the diagonals. E.g. A = [1 2 3; 4 5 6; 7 8 9;...

12 mesi fa

Risolto


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

12 mesi fa

Risolto


Sum of odd numbers in a matrix
Find the sum of all the odd numbers in a matrix. Example x = [2 3 5 7 1 4 11] y = 27

12 mesi fa

Risolto


Find Logic 20

12 mesi fa

Risolto


Count up then down
Create a function that produces counting up from 0 up to n then down to 0 n=2 --> 0 1 2 1 0 n=3 --> ...

12 mesi fa

Risolto


Coefficient of Kinetic friction
A robot exerts a F1 lb. force horizontally on a W lb. crate across a concrete floor at a constant speed. What is the coefficien...

12 mesi fa

Risolto


Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

12 mesi fa

Risolto


Create a vector whose elements depend on the previous element
The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...

12 mesi fa

Risolto


Convert hex color specification to MATLAB RGB
Here's something that comes up all the time if you deal with web pages. Given a <http://www.w3schools.com/html/html_colors.as...

12 mesi fa

Risolto


Find Logic 13

12 mesi fa

Carica altro