Risolto


Area of a regular hexagon
Given the length of a side of a regular hexagon, return its area rounded to two decimal places.

oltre 4 anni fa

Risolto


Get the n-th rand number with given seed
Given seed s, return the n-th rand number using rand(). Round the answer with 4 digits. n is a postive integer.

oltre 4 anni fa

Risolto


Check if a matrix Diagonal is equal to its secondary diagonal
Your function should return True if the secondary diagonal is equal to diagonal, and False otherwise. Eg: M = [1 2 1 ...

oltre 4 anni fa

Risolto


Draw the symbol '+'
Draw '+' in an x-by-x matrix (where x is odd and x >3) Example: x = 5 y = [0 0 1 0 0 0 0 1 0 0 1 1 1 1 1 0 ...

oltre 4 anni fa

Risolto


Add the number of horizontal and vertical movements to each matrix element
Given n, create a square matrix and with element (1,1) = 1, add 1 to each element for each horitizonal and vertical movement. E...

oltre 4 anni fa

Risolto


Check Number Even/Odd
Return 0 if number even, return 1 if number is false

oltre 4 anni fa

Risolto


Draw 'Y'
Draw 'Y' in an x-by-x matrix (where x is odd and x >= 3) Examples: x = 3 y = [1 0 1 0 1 0 0 1 0] x = 5 y = [1...

oltre 4 anni fa

Risolto


Return elapsed time
Write a function that returns the amount of time it takes to run the function, as measured by tic and toc. Your answer must be c...

oltre 4 anni fa

Risolto


An n-sided regular polygon is drawn within a circle whose radius is 'r', what will be the area of the polygon?
area of a polygon is p*a/2. where, p is the perimeter and a is the apothem i.e. the normal distance from center to any of the si...

oltre 4 anni fa

Risolto


Create different color vectors.
When producing figures with multiple lines on, you often want the lines to all be visible and different colors. Given the need f...

oltre 4 anni fa

Risolto


Connect Four: find winning move
Inspired by <http://www.mathworks.com/matlabcentral/cody/problems/90-connect-four-win-checker this problem>... <http://en.wik...

oltre 4 anni fa

Risolto


Truncatable Prime
A truncatable prime is a leading digit is successively removed, then all resulting numbers are prime. Wiki When given a number...

oltre 4 anni fa

Risolto


Circle Division
A circle can be divided into 2 sections, by placing 2 points in arbitrary locations along its circumference and drawing a straig...

oltre 4 anni fa

Risolto


LASER Tracker - Mirror Distance and Angle
Determine the mirror's distance and relative angle to the LASER Tracker given the distances to a reference SMR (Spherical Mounte...

oltre 4 anni fa

Risolto


Add
add

oltre 4 anni fa

Risolto


Multiple by 4
multple ny 4

oltre 4 anni fa

Risolto


Create matrix with Gray code
Output "g" should be a matrix of class double, with <http://en.wikipedia.org/wiki/Gray_code Gray reflected binary code>. Inpu...

oltre 4 anni fa

Risolto


Disjunctive Normal Form
This problem is the companion to Problem <http://www.mathworks.com/matlabcentral/cody/problems/1484 1484>. In Boolean logic, a f...

oltre 4 anni fa

Risolto


Conjunctive Normal Form
In Boolean logic, a formula is in conjunctive normal form (CNF) or clausal normal form if it is a conjunction of clauses, where ...

oltre 4 anni fa

Risolto


Number of paths on a grid
Consider a grid formed by n vertices vertically down, and m vertices horizontally right. Your starting point is at the top lef...

oltre 4 anni fa

Risolto


Index of a Rational number
The set of real numbers are infinite. They are so many that real numbers can't even be enumerated. However, unlike real numbers ...

oltre 4 anni fa

Risolto


Numbered lottery balls into cells
You are running a lottery, and have a number of different balls numbered 1 to N. Your job is to figure out how many different w...

oltre 4 anni fa

Risolto


Create an 8-color version of an image
This problem was inspired by a tweet I saw from @MATLAB regarding <http://www.mathworks.com/matlabcentral/fileexchange/37816-the...

oltre 4 anni fa

Risolto


Leap years on other planets
A year is a leap year if it is divisible by 4, but not if it is divisible by 100, unless it is also divisible by 400. This mean...

oltre 4 anni fa

Risolto


Creation of 2D Sinc Surface
This Challenge is to efficiently create the Sombrero function of various sizes, resolutions, and frequencies. <<https://sites...

oltre 4 anni fa

Risolto


Find smallest integer type to accommodate your number
MATLAB supports 1-, 2-, 4-, and 8-byte storage for integer data. Find the smallest integer type to accomodate a scalar integer. ...

oltre 4 anni fa

Risolto


first step for Huffman Coding (easy)
Given a string, you must sort the characters by occurrence (from lowest to highest). This step is necessary to generate a Huf...

oltre 4 anni fa

Risolto


Flip the diagonal values
Write a program that flip the elements of main diagonal , upper and lower diagonal values of a sqare matrix. For example if a ...

oltre 4 anni fa

Risolto


find the second element of array
easy find the second element

oltre 4 anni fa

Risolto


Probability of Choosing a Red Ball
Given two jars of red and blue balls, find the probability of choosing a red ball from Jar 1 after going through the steps. ...

oltre 4 anni fa

Carica altro