Solved


Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

circa 4 anni ago

Solved


Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

circa 4 anni ago

Solved


Multielement indexing of a row array
The row array birthRateChina stores the China birth rate (per 1000 people) for years 2000 to 2012. Write a statement that create...

circa 4 anni ago

Solved


Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

circa 4 anni ago

Solved


The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

circa 4 anni ago

Solved


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

circa 4 anni ago

Solved


Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

circa 4 anni ago

Solved


Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

circa 4 anni ago

Solved


Fahrenheit to Celsius using multiple statements
Given a Fahrenheit value F, convert to a Celsius value C. While the equation is C = 5/9 * (F - 32), as an exercise use two state...

circa 4 anni ago

Solved


Create a row array using double colon operator
Create a row array from 9 to 1, using the double colon operator.

circa 4 anni ago

Solved


For a given linear index as input for n sized square matrix, find corresponding row and column.
If input is 1, the row and column will be 1 and 1 respectively.

circa 4 anni ago

Problem


For a given linear index as input for n sized square matrix, find corresponding row and column.
If input is 1, the row and column will be 1 and 1 respectively.

circa 4 anni ago | 0

Solved


print date for a given number in date reference is INDIAN calendar,not Christ's Birth.
The Vikram Samvat is said to have been founded by the emperor Vikramaditya of Malwa following his victory over the Sakas in 56 Y...

circa 4 anni ago

Problem


print date for a given number in date reference is INDIAN calendar,not Christ's Birth.
The Vikram Samvat is said to have been founded by the emperor Vikramaditya of Malwa following his victory over the Sakas in 56 Y...

circa 4 anni ago | 0

Solved


Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

circa 4 anni ago

Solved


The Goldbach Conjecture
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

circa 4 anni ago

Solved


Assigning a sum
* Write a statement that assigns numCoins with numNickels + numDimes.

circa 4 anni ago

Solved


Convert yards to feet
The goal of this script is to convert a value given in yards to feet.

circa 4 anni ago

Solved


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

circa 4 anni ago

Solved


Remove the vowels
Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

circa 4 anni ago

Solved


Circle area using pi
Given a circle's radius, compute the circle's area. Use the built-in mathematical constant pi.

circa 4 anni ago

Solved


Get all corner elements from a matrix where dimension of matrix is always equal to or greater than 2.
if a given matrix a = [1 2 3;4 5 6]; so answer is going to be [1 3;4 6]

circa 4 anni ago

Problem


Get all corner elements from a matrix where dimension of matrix is always equal to or greater than 2.
if a given matrix a = [1 2 3;4 5 6]; so answer is going to be [1 3;4 6]

circa 4 anni ago | 0

Solved


radius of a spherical planet
you just measured its surface area, that is the input.

circa 4 anni ago

Solved


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

circa 4 anni ago

Solved


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

circa 4 anni ago

Solved


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

oltre 4 anni ago

Solved


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 4 anni ago

Solved


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

oltre 4 anni ago

Solved


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

oltre 4 anni ago

Load more