Solved


Repetition of matrices
*A is a bold matrix: [1 2 3; 4 5 6;7 8 9]* Given an integer 'n' , a matrix B exists such that has n copies of A in the row an...

6 years ago

Solved


Percentage of zeros in a matrix of only 1s and 0s
Write a function called _zero_stat_ that takes a matrix as an input that only has 0 and 1 elements. The function needs to comput...

6 years ago

Solved


Convert ColorSpec string to RGB triplet
Given a ColorSpec string, either in short or long form, return the corresponding RGB triplet. If the input is not a valid color,...

6 years ago

Solved


Convert RGB triplet to ColorSpec string
This is the inverse to <http://www.mathworks.com/matlabcentral/cody/problems/42612-convert-colorspec-string-to-rgb-triplet this ...

6 years ago

Solved


Factorize uniquely! (★★)

6 years ago

Problem


Find jumping medalists

6 years ago | 3 | 20 solvers

Solved


Make a rainbow matrix (follow-up to checkerboard matrix)
Given an integer n, make an n-by-n matrix as shown below. The a(1,1) should be 0. As we move away from the top-left, the number ...

6 years ago

Solved


More luck than brains
Give a random function that guess and return numbers from 1 to 6 exactly like the test suite .

6 years ago

Solved


Convert this color - RGB Vector to Hex String
Given a 3 element RGB vector corresponding to a color (given by the MATLAB color spec <http://www.mathworks.com/help/matlab/ref/...

6 years ago

Solved


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

6 years ago

Solved


Card Game
This is an overly simplified and highly modified version of card game Twenty-Nine. A deck of 100 unique cards (hypothetical) ...

6 years ago

Solved


solid of revolution
Given an real polynomial P and two real numbers a,b with 0<=a<=b. Calculate the volume of the solid of revolution made by rota...

6 years ago

Solved


house of cards
How many cards do one need to build a house of cards with n stages? Short explanation: /\ 2 cards for 1 stage ...

6 years ago

Solved


attenuation
A beam of X-rays propagates a length d(1) through a medium with an attenuation coefficient alpha(1). After that the beam propaga...

6 years ago

Solved


jumping astronauts
The surface gravity on the moon is approximately 2 m/s^2. Thats why an funny astronauts feels as light as a feather and jumps fr...

6 years ago

Solved


Pig Latin to English Translator
Pig latin is a faux-language based off of English. The rules are as follows (excerpted from the <http://en.wikipedia.org/wiki/Pi...

6 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): ...

6 years ago

Solved


microseconds passed today
Calculate the amount of microseconds passed for a given date string. Return the value, rounded to the nearest integer, as a stri...

6 years ago

Solved


Xor of matrix
you have to set exclusive OR of two arrays

6 years ago

Solved


Throw common elements of two vector arrays in sorted manner
Throw common elements as output in sorted manner (acending order) of two given input vector arrays

6 years ago

Solved


Find square of given number
Find Square of any number

6 years ago

Solved


Calculate Resistance 2
In this problem, you have to calculate Resistance R of a linear conductor having voltage V across it and current I is passing i...

6 years ago

Solved


Calculate Resistance
Calculate Resistance R of a linear conductor having resistivity p, length l and area A

6 years ago

Solved


Add 3 numbers
In this problem, you have to add three numbers a, b and c. Give output d = add(a,b,c)

6 years ago

Solved


Calculate the square of a number (Super Easy)
The goal is to calculate the square (y) of a number (x). Good way to start MatLab for beginners.

6 years ago

Solved


Scalar Matrix Manipulation
Assume, input x is a scalar matrix such as, x = 2 0 0 0 2 0 0 0 2 th...

6 years ago

Solved


Back to basics 18 - justification
Covering some basic topics I haven't seen elsewhere on Cody. Given a string with extra spaces in front and/or in back, return...

6 years ago

Solved


Penny flipping - calculate winning probability (easy)
Two players are playing a fair penny flipping game. For each flip, the winner adds one penny from the loser's collection to his/...

6 years ago

Solved


free points
function y = your_fcn_name(x) y = x(1)+x(2); end

6 years ago

Solved


Matrix to vector transformation
given a matrix, make in the output 1 column vector putting odd numbers in ascending order after that put the even numbers in des...

6 years ago

Load more