Risolto


Back to basics 23 - Triangular matrix
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, return a matrix with all elements above a...

oltre 3 anni fa

Risolto


Test Problem; Create a 5x5 array containing all ones
This is a test for learning the process of creating a Cody problem. The goal of this test problem will be to create an array,...

oltre 3 anni fa

Risolto


Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

oltre 3 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 = ...

oltre 3 anni fa

Risolto


length of a vector
Find twice the length of a given vector.

oltre 3 anni fa

Risolto


Create a two dimensional zero matrix
You have to create a zero matrix of size (mxn) whose inputs are m and n and the elements of your matrix should be zeros. Exam...

oltre 3 anni fa

Risolto


Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

oltre 3 anni fa

Risolto


Draw 'O' !
Given n as input, generate a n-by-n matrix 'O' using 0 and 1 . example: n=4 ans= [1 1 1 1 1 0 0 1 ...

oltre 3 anni fa

Risolto


Draw 'F'
Draw a x-by-x matrix 'F' 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 ...

oltre 3 anni fa

Risolto


Draw 'D'.
Draw a x-by-x matrix 'D' using 0 and 1. example: x=4 ans= [1 1 1 0 1 0 0 1 1 0 0 1 1 1 1 0]

oltre 3 anni fa

Risolto


Draw 'I'
Given n as input, draw a n-by-n matrix 'I' using 0 and 1. example: n=3 ans= [0 1 0 0 1 0 0 1 0] n=...

oltre 3 anni fa

Risolto


Draw a 'Z'.
Given _n_ as input, generate a n-by-n matrix like 'Z' by _0_ and _1_ . Example: n=5 ans= [1 1 1 1 1 0 0 0 1 ...

oltre 3 anni fa

Risolto


Make a run-length companion vector
Given a vector x, return a vector r that indicates the run length of any value in x. Each element in r shows how many times the ...

oltre 3 anni fa

Risolto


Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

oltre 3 anni fa

Risolto


Getting the row and column location from a matrix
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to get <http://www.mathwo...

oltre 3 anni fa

Risolto


Test for balanced parentheses
Given the input inStr, give the boolean output out indicating whether all the parentheses are balanced. Examples: * If ...

oltre 3 anni fa

Risolto


Wrapping the Tower of Pisa
The famous artist Christo Vladimirov Javacheff, who likes pizza, wants to wrap the well-known Italian tower in paper. It is a ci...

oltre 3 anni fa

Risolto


Make an awesome ramp for a tiny motorcycle stuntman
Okay, given a vector, say v=[1 3 6 9 11], turn it into a matrix 'ramp' like so: m=[1 3 6 9 11; 3 6 9 11 0; 6 9 ...

oltre 3 anni fa

Risolto


Output any real number that is neither positive nor negative
Output any real number that is neither positive nor negative

oltre 3 anni fa

Risolto


Size of this cup?
The given vector has diameter of the cup in mm sampled at micrometer increments in depth from top to bottom, need output in cc a...

oltre 3 anni fa

Risolto


Snakes on a plane
Given the dimensions of a 2-d plane, create a matrix where a "snake" of ones occupies the plane from top left to bottom right. ...

oltre 3 anni fa

Risolto


Half?
If you toss an even number (x) of coins, what is the probability (y) of 50% head and 50% tail?

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


Distance walked 2D
Suppose you go from x-y coordinates [3,4] to [0,0] to [0,1] to [1,1], then you walked 7 units of distance.

oltre 3 anni fa

Risolto


Volume of this donut
Given hole diameter a, and outermost diameter b, determine the volume y of the resulting donut.

oltre 3 anni fa

Risolto


Gambler?
Given a handle to a wealth function, confirm within 100 milliseconds 'Millionaire', 'Likely', or 'Gambler', if wealth() returns ...

oltre 3 anni fa

Risolto


Grandpa's telescope
Two grandkids Dorothy and Benjamin are sharing a telescope made by their grandpa, who used an old lens of spectacles as the obje...

oltre 3 anni fa

Risolto


drowsy?
This dog() may be drowsy or function immediately when you call, return 1 or 0 accordingly within 2/10 second.

oltre 3 anni fa

Risolto


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

oltre 3 anni fa

Risolto


Leaking?
Graham's law states that the rate of effusion of a gas is inversely proportional to the square root of its molecular weight. A b...

oltre 3 anni fa

Carica altro