A résolu


Finding the volume of a basketball.
You are given a basketball with a given radius (r), what is its volume?

plus de 11 ans il y a

A résolu


Alkane
Given a number, x, that is equal to the number of carbon atoms in an <http://en.wikipedia.org/wiki/Alkane alkane>, find, y, the ...

plus de 11 ans il y a

A résolu


Logical operators: Flipping bits
The xor operator will toggle the bit if the bit is xored with 1. Ex: 1 XOR 0 = 1, 1 XOR 1 = 0. The xor operator will retain th...

plus de 11 ans il y a

A résolu


Element-wise division
* Assign row array weightKilo with the corresponding weight in kilograms. Use the following conversion: kg = lb / 2.2

plus de 11 ans il y a

A résolu


calculate interest saved because of reduction of interest rate
calculate interest saved because of a reduction of interest rate per year (Assuming No leap year) Currently, in India, rate o...

plus de 11 ans il y a

A résolu


Convert Kilometers to Miles
Convert kilometers to miles. Consider 1 km = 0.62 mile. Note: Don't use the '*' operator.

plus de 11 ans il y a

A résolu


Is the test point on the line segment?
Given the [x,y,z] coordinates for the three points pa, pb, and pc, return true if the test point pc is on the line segment with ...

plus de 11 ans il y a

A résolu


Sideways sum
Given natural number calculate its _population count_.

plus de 11 ans il y a

A résolu


Function definition: BMI calculator
Define a function CalculateBMI with inputs massKg and heightCm. The function returns bodyMassIndex. The function should be able ...

plus de 11 ans il y a

A résolu


Nth root.
* Assign outValues with the nth root of the inValues, the root is specified by rootValue

plus de 11 ans il y a

A résolu


Help the Patriots get to the Super Bowl
Given a football by the Patriots, return it to them with 2 psi less air in it. (The original psi is passed as a number to the...

plus de 11 ans il y a

A résolu


Remove and Sort
Given a randomized array n, sort it and remove all odd integers. n=5 y = [2 4]

plus de 11 ans il y a

A résolu


Rotate and display numbered tile
Imagine a square tile with four numbers on it, one on each edge. We will call these edges north, east, south, and west. If th...

plus de 11 ans il y a

A résolu


Print the largest eigenvalue of A(500)
Write a function that prints the largest eigenvalue of A(500), without any extraneous output. For a positive integer n, let A...

plus de 11 ans il y a

A résolu


Matlab Basics - Switching Assignments
Switch assignments for variables x and y, for example start with x = 1 and y = 3 end with y = 1 and x = 3 Do NOT simply r...

plus de 11 ans il y a

A résolu


Matlab Basics - Pick out parts of a vector
Consider x a vector of length >= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, a...

plus de 11 ans il y a

A résolu


Matlab Basics - Logical Tests I
Write a script to test whether a year number is for a leap year or not. eg. x = 1884 output = 1 eg. x = 3 output = 0

plus de 11 ans il y a

A résolu


Find difference of two set as per example
Find difference of two set as per example Say x=[1:5] and y=[2:6] then, set_diff(x,y) should give output[1] and set_diff(y...

plus de 11 ans il y a

A résolu


Convert number from given base to other base
Convert number from given base to other base. Example 400 in base 5, find equivalent number in base 8, it is 144.

plus de 11 ans il y a

A résolu


Interior angles
Find the sum of interior angles for polygon of x sides.

plus de 11 ans il y a

A résolu


Binary code (array)
Write a function which calculates the binary code of a number 'n' and gives the result as an array(vector). Example: Inpu...

plus de 11 ans il y a

A résolu


Deriving a function using the difference quotient
Write a function that evaluates the derivative of a function in a given point using the well-know formula of the difference quot...

plus de 11 ans il y a

A résolu


İmage Series 1 OR
Given two input first one is a number which is uint8, second one is image which is 8 bit gray scale image, the image has pixsels...

plus de 11 ans il y a

A résolu


İmage Series 2 AND
Given two input first one is a number which is uint8, second one is image which is 8 bit gray scale image, the image has pixsels...

plus de 11 ans il y a

A résolu


Image Series 3 Complementary
Find the Complementary of image which is 8 bits gray scale image. Each pixel is converted to binary format in the image. A...

plus de 11 ans il y a

A résolu


solve for y that is half as much as three less than one tenth of x
function y = half(x) y = (x * .1); end

plus de 11 ans il y a

A résolu


Approximation of Pi (vector inputs)
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...

plus de 11 ans il y a

A résolu


Approximation of Pi
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...

plus de 11 ans il y a

A résolu


Perimeters/Circumference
Given an array. Determine whether the perimeter is of a circle, triangle or square. Then calculate the perimeter.

plus de 11 ans il y a

A résolu


Areas
Given certain dimensions determine the area of that shape. If given only one value assume its the radius. Use round(x) to round ...

plus de 11 ans il y a

Charger plus