Solved

Find the dimensions of a matrix
Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

4 mois ago

Solved

01 - Scalar variables
Create the following variables: <<http://samle.dk/STTBDP/Assignment1_1.png>>

4 mois ago

Solved

The sum of the numbers in the vector
eg. [1,2,3]---->SUM=6

4 mois ago

Solved

Volume of a sphere given its surface area
You just measured its surface area, that is the input.

4 mois ago

Solved

Return area of square
Side of square=input=a Area=output=b

4 mois ago

Solved

Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

4 mois ago

Solved

Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

4 mois ago

Solved

Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

4 mois ago

Solved

find the maximum element of the matrix
for e.g x = [1 2; 3 4] y = 4

4 mois ago

Solved

Reverse a string
Reverse the given string. Example input = 'reverse' output = 'esrever'

4 mois ago

Solved

Area of square
Find the area of a square whose diagonal length is given as x.

4 mois ago

Solved

Speed of car travelling x meters in y seconds
What is the speed of a car if the car travelled x meters in y seconds? Supply the answer in m/s.

4 mois ago

Solved

raise 1/3
Raise a number to 1/3 power.

4 mois ago

Solved

Even or Odd
Write a function which can tell us if the given value x is odd or even. So if x is even return true and if x is odd return false...

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

4 mois ago

Solved

Calculate the number of elements in a matrix.
Calculate the number of elements in a matrix.

4 mois ago

Solved

Geometric Series
Given x and n, give the sum of x ^ 1 to x ^ n. You should not have to use a loop for this.

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

4 mois ago

Solved

Integer Sequence - II : New Fibonacci
Crack the following Integer Sequence. (Hints : It has been obtained from original Fibonacci Sequence and all the terms are also ...

5 mois ago

Solved

Pi Digit Probability
Assume that the next digit of pi constant is determined by the historical digit distribution. What is the probability of next di...

5 mois ago

Solved

Find the two-word state names
Given a list of states, remove all the states that have two-word names. If s1 = 'Alabama Montana North Carolina Vermont N...

11 mois ago

Solved

Encode Roman Numerals
Create a function taking a non-negative integer as its parameter and returning a string containing the Roman Numeral representat...

11 mois ago

Solved

Pi Estimate 1
Estimate Pi as described in the following link: <http://www.people.virginia.edu/~teh1m/cody/Pi_estimation1.pdf>

11 mois ago

Solved

Log of a number
Write a script that will give the log of x as output.

11 mois ago

Solved

Annual Salary
What is the annual salary of Mr. Cody if he works 40 hours a week and gets \$x per hour and a yearly bonus of \$2000? (Let, 50 wee...

11 mois ago

Solved

Square root of a number
Write a code that will output the square root of x.

11 mois ago

Solved

Write a code that will follow the equation y = x * (x + x) * x.
If x = 5, y = 5 * (5+5) * 5 = 250

11 mois ago

Solved

Area of a circle
Given the radius x, y would be the area of a circle. Pi = 3.1416

11 mois ago

Solved

Roots
Find out the roots of a given polynomial equation.Given are the coefficients of the equation.

11 mois ago