Risolto


N-Queens Checker
Picture a chessboard populated with a number of queens (i.e. pieces that can move like a queen in chess). The board is a matrix,...

circa 5 anni fa

Risolto


Perfect Square or not
find Given input x is perfect square or not,if yes then output y=1.else y=0

circa 5 anni fa

Risolto


Area of a Square
Inside a square is a circle with radius r. What is the area of the square?

circa 5 anni fa

Risolto


Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.

circa 5 anni fa

Risolto


Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

circa 5 anni fa

Risolto


Is my wife right?
Regardless of input, output the string 'yes'.

circa 5 anni fa

Risolto


Is My Wife Wrong?
Answer the question. (see also <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right Problem 149: Is my ...

circa 5 anni fa

Risolto


Concatenate two strings
Its very easy. Just concatenate two strings.

circa 5 anni fa

Risolto


Multiply by 3
Given the variable x as your input, multiply it by three and put the result in y.

circa 5 anni 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;...

circa 5 anni fa

Risolto


Calculate square and cube of number
Calculate square and cube of number x

circa 5 anni fa

Risolto


Speed of car
Calculate the Speed of car given its Distance travelled and time taken in x and y respectively

circa 5 anni fa

Risolto


factorial of a number x
Factorial of a number x

circa 5 anni fa

Risolto


Array of Ones
Create a 100 X 100 array of ones.

circa 5 anni fa

Risolto


Eight Queens Solution Checker
Write a function to verify whether an arrangement of queens on a chessboard is a valid solution to the classic <http://en.wikipe...

circa 5 anni fa

Risolto


Wheat on a chessboard pt 2
If a chessboard were to have wheat placed upon each square such that x grains were placed on the first square and each successiv...

circa 5 anni fa

Risolto


Wheat on a chessboard pt 1
If a chessboard were to have wheat placed upon each square such that one grain were placed on the first square and each successi...

circa 5 anni fa

Risolto


Create a Multiplication table matrix...
Create a product table in this format: P = [ 1 2 3 4 5; 2 4 6 8 10; 3 6 9 12 15; 4 8 12 1...

circa 5 anni fa

Risolto


"mirror" matrix
Create n x 2n "mirror" matrix of this type: Examples For n = 2 m = [ 1 2 2 1 1 2 2 1 ] For n = 3 m = ...

circa 5 anni fa

Risolto


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

circa 5 anni fa

Risolto


Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN; output -> matrix(p*m), the same matrix where we deleted the enti...

circa 5 anni fa

Risolto


Given a 4x4 matrix, swap the two middle columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...

circa 5 anni fa

Risolto


07 - Common functions and indexing 5
Create the vector _lin_: <<http://samle.dk/STTBDP/Assignment1_7e.png>> (the integers from 1 to 20) Make every other val...

circa 5 anni fa

Risolto


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

circa 5 anni fa

Risolto


Max of a Vector
Write a function to return the max of a vector

circa 5 anni fa

Risolto


Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

circa 5 anni fa

Risolto


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

circa 5 anni fa

Risolto


Find the 9's Complement
Find the 9's complement of the given number. An example of how this works is <http://electrical4u.com/9s-complement-and-10s-c...

circa 5 anni fa

Risolto


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

circa 5 anni fa

Risolto


Converting binary to decimals
Convert binary to decimals. Example: 010111 = 23. 110000 = 48.

circa 5 anni fa

Carica altro