A résolu


The rabbit problem
Someone discovered that rabbits reproduce at the rate of fibonnaci so you just input the number and it will print the fibonnaci ...

plus de 7 ans il y a

A résolu


Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

plus de 7 ans il y a

A résolu


Find out sum of prime number till given number
Find out sum of prime number till given number Example, if number is 10, then answer must be 17.

plus de 7 ans il y a

A résolu


Find the area of a rectangle if length of the diagonal is given.
if length of a diagnonal in rectangle is 5. Its area is 12.

plus de 7 ans il y a

A résolu


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

plus de 7 ans il y a

A résolu


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

plus de 7 ans il y a

A résolu


Small Riddle
Mr. Smith has two children. If the older child is a boy, what are the odds that the other child is also a boy?

plus de 7 ans il y a

A résolu


Solve Linear equations
Solve Linear equations Example: x+y=2 and x+2y=3, then x and y equal to 1.

plus de 7 ans il y a

A résolu


Time Expansion
How can you slow down any discrete-time signal? Example Input original signal x. x = [1 2 3 -1 -2 -5 -4] We want t...

plus de 7 ans il y a

A résolu


Matlab Basics II - Unit Conversion
Write a function that converts Kg to lbs, returns the answer to the nearest 1/100th of a pound

plus de 7 ans il y a

A résolu


Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...

plus de 7 ans il y a

A résolu


Change the first and last diagonal element of the identity matrix to zero
Starting with the identity matrix, change first and last diagonal element to zero. Example If n=5 A = 0 0 ...

plus de 7 ans il y a

A résolu


Perimeter
Given a sequence of points forming a closed path (first and last points are coincident) return the perimeter value. For example...

plus de 7 ans il y a

A résolu


Summation of array
Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

plus de 7 ans il y a

A résolu


Find Out sum of principal diagonal element of given matrix
Find out sum of principal diagonal element of given matrix If A=[1 0 0; 0 1 0;0 0 1], then answer must be 3.

plus de 7 ans il y a

A résolu


Television Screen Dimensions
Given a width to height ratio of a TV screen given as _w_ and _h_ as well as the diagonal length of the television _l_, return t...

plus de 7 ans il y a

A résolu


Sum of the Multiplication of Vectors
Given the vectors x and y as input, multiply the vectors and return the summation of its elements. Example: x = [1 2 ...

plus de 7 ans il y a

A résolu


Find the elements of a matrix according to a defined property.
From A = [5,2,3] and B = [1,2,3,4,5,6,7,8,9,10] produce a vector C where : C(1) is the sum of the first A(1) elements of B, ...

plus de 7 ans il y a

A résolu


Pascal's Matrix
Given an integer n &ge; 0, generate the ( _n_+1) &times; ( _n_+1) lower triangular <http://en.wikipedia.org/wiki/Pascal_matrix P...

plus de 7 ans il y a

A résolu


Box!
Given a box, find the volume of the cube. With each side = a.

plus de 7 ans il y a

A résolu


Square wave average calculation
Given its peak and duty cycle, calculate avg value of square wave

plus de 7 ans il y a

A résolu


UICBioE240 problem 1.6
Find the tangent line of a right triangle given the two of the sides. So if A = [1 1] B = sqrt(2)

plus de 7 ans il y a

A résolu


Power supply: 230V to 115V
The problem is simple: we have a wall outlet which supplies 230V and an apparatus that requires 115V. Software is always chea...

plus de 7 ans il y a

A résolu


Polynomial division
Divide a polynomial u by polynomial v and return the quotients only. Example: u = x^4+3*x^3+5*x+3 v = x^2+1 Answer: ...

plus de 7 ans il y a

A résolu


Einsteinium-253 decay
Radioactive Einsteinium-253 has a half-life of 1,768,608 seconds. Given 1000mg of Einsteinium-253 at t=0 days, how much is lef...

plus de 7 ans il y a

A résolu


Upper triangular matrix
Create a function to retrieve the upper triangular matrix of a matrix (without using tril). The matrix will always be square. ...

plus de 7 ans il y a

A résolu


Find nth maximum
Find nth maximum in a vector of integer numbers. Return NaN if no such number exists. x = [2 6 4 9 -10 3 1 5 -10]; So ...

plus de 7 ans il y a

A résolu


Writing a recursive math function
Complete the recursive function RaiseToPower(). Ex: If userBase is 2 and userExponent is 4, then raisedValue is assigned wit...

plus de 7 ans il y a

A résolu


Function call: Kilometers to miles
Assign rateMPH with the corresponding rate in miles per hour given a user defined rateKPH, which is a rate in kilometers per hou...

plus de 7 ans il y a

A résolu


Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

plus de 7 ans il y a

Charger plus