Solved


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

7 years ago

Solved


Variable Assignment
Complete the ? part by assigning myExamScore with 100.

7 years ago

Solved


Are you in XY plane?
Take a point P as an input position Vector (x,y,z). If you are in XY plane, return 1 as an output otherwise return 0. Example...

7 years ago

Solved


Determine if input is divisible by three.
Given a positive integer, n, determine if n is divisible by 3. If yes, the function should output true. If no, false.

7 years ago

Solved


Find the product of a Vector
How would you find the product of the vector [1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0] times 2?; x = [1 : 0.5 : 6]; y ...

7 years ago

Solved


Matrix with different incremental runs
Given a vector of positive integers a (>=0); How does one create the matrix where the ith column contains the vector 1:a(i) poss...

7 years ago

Solved


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

7 years ago

Solved


Relative ratio of "1" in binary number
Input(n) is positive integer number Output(r) is (number of "1" in binary input) / (number of bits). Example: * n=0; r=...

7 years ago

Solved


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

7 years ago

Solved


Matlab Basics II - Create a vector with a repeated entry
Create a row vector of length n, filled with 4's, for example, if n = 3 output = [4 4 4] make sure to round UP when n is a...

7 years ago

Solved


Palindrome Check
Check whether the entire matrix is palindrome or not. Example matrix = [7 8 7] matrix_reverse = [7 8 7] So the mat...

7 years ago

Solved


How many monitors are connected ?
How to obtain the numbers of monitors connected to your computer ?

7 years ago

Solved


Largest Twin Primes
<http://en.wikipedia.org/wiki/Twin_prime Twin primes> are primes p1, p2 = p1 + 2 such that both p1 and p2 are prime numbers. Giv...

7 years ago

Solved


Check if equal
Return true if all the elements of an nD array are equal, false otherwise.

7 years ago

Solved


The Dark Side of the Die
It is well-known that opposite sides of a classic hexahedral die add to 7. Given a vector of dice rolls, calculate the sum of th...

7 years ago

Solved


Calculate distance travelled when given radius and rotations
When given radius of wheel and number of rotations calculate total distance travelled consider pi=3.14

7 years ago

Solved


Matlab Basics - Rounding III
Write a script to round a large number to the nearest 10,000 e.g. x = 12,358,466,243 --> y = 12,358,470,000

7 years ago

Solved


Matlab Basics II - Count rows in a matrix
Write a function that returns that number of rows in a vector or matrix x example: x = [1; 2; 3] output = 3

7 years ago

Solved


Area of a circle
Find the value for area of the circle if diameter is given

7 years ago

Solved


Prime checker
Complete the recursive function to determine if a number is prime. Skeletal code is provided in the PrimeChecker function.

7 years ago

Solved


Sum of odd numbers in a matrix
Find the sum of all the odd numbers in a matrix. Example x = [2 3 5 7 1 4 11] y = 27

7 years ago

Solved


Convert a numerical matrix into a cell array of strings
Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...

7 years ago

Solved


Count decimal digits of a number
* Given an integer number you have to return the number of its digits. * For example 248 has 3 digits and 1589 has 4 digits ...

7 years ago

Solved


Travel speed
Write an anonymous function to compute the Euclidean distance given two points (x1, y1) and (x2, y2). Use the following equation...

7 years ago

Solved


Convert from Base 10 to base 5
Convert the input number from base 10 into base 5: for example: if a(in base 10)= 5 then a(in base 5)= 10

7 years ago

Solved


Currency conversion
A currency exchange booth offers an exchange rate of 119.771 Japanese yen for 1 US dollar. The currency exchange booth rounds do...

7 years ago

Solved


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

7 years ago

Solved


Finding values in arrays
Assign numMatches with the number of elements in userValues that equal matchValue. Ex: If matchValue = 2 and userVals = [2, ...

7 years ago

Solved


Angle of triangle
For three unknown points a b c, given three sides ab bc ca, find three angles abc bca cab in radians. Your function should b...

7 years ago

Solved


letter yes yes & letter no no
Split a string into two strings, first string has all alphabetic letters, next string has all the rest, keep the order please, o...

7 years ago

Load more