Gelöst


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

mehr als ein Jahr vor

Gelöst


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

mehr als ein Jahr vor

Gelöst


Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

mehr als ein Jahr vor

Gelöst


Pizza!
Given a circular pizza with radius z and thickness a, return the pizza's volume. [ z is first input argument.] Non-scored bonus...

fast 2 Jahre vor

Gelöst


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

fast 2 Jahre vor

Gelöst


An Ohm's Law Calculator
*BACKGROUND / MOTIVATION:* Many important observations in math and science can be described by short, but powerful, equations...

fast 2 Jahre vor

Gelöst


Total energy

fast 2 Jahre vor

Gelöst


Laws of motion 6

fast 2 Jahre vor

Gelöst


Laws of motion 5

fast 2 Jahre vor

Gelöst


Laws of motion 4
Given the initial velocity 'u', final velocity 'v' and acceleration 'a', find the distance travelled.

fast 2 Jahre vor

Gelöst


Laws of motion 3

fast 2 Jahre vor

Gelöst


Laws of motion 2

fast 2 Jahre vor

Gelöst


Laws of motion 1

fast 2 Jahre vor

Gelöst


Kinetic energy calculation

fast 2 Jahre vor

Gelöst


Calculate BMI
Given a matrix hw (height and weight) with two columns, calculate BMI using these formulas: 1 kilogram = 2.2 pounds 1 inch = 2...

fast 2 Jahre vor

Gelöst


Calculate Amount of Cake Frosting
Given two input variables r and h, which stand for the radius and height of a cake, calculate the surface area of the cake you n...

fast 2 Jahre vor

Gelöst


Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

fast 2 Jahre vor

Gelöst


Find the Best Hotels
Given three input variables: hotels - a list of hotel names ratings - their ratings in a city cutoff - the rating at which yo...

fast 2 Jahre vor

Gelöst


Find the Oldest Person in a Room
Given two input vectors: * |name| - user last names * |age| - corresponding age of the person Return the name of the ol...

fast 2 Jahre vor

Gelöst


Find max
Find the maximum value of a given vector or matrix.

fast 2 Jahre vor

Gelöst


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

fast 2 Jahre vor

Gelöst


Is A the inverse of B?
Given a matrix A and a matrix B, is A the inverse of B? >>A=[2,4;3,5]; >>B=[-2.5,2;1.5,-1]; >>isInverse...

fast 2 Jahre vor

Gelöst


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

etwa 2 Jahre vor

Gelöst


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

etwa 2 Jahre vor

Gelöst


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

etwa 2 Jahre vor

Gelöst


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

etwa 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Gelöst


Simple equation: Annual salary
Given an hourly wage, compute an annual salary

etwa 2 Jahre vor

Gelöst


Find the max element of the array
Find the max element of the array

etwa 2 Jahre vor

Gelöst


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

etwa 2 Jahre vor

Mehr laden