Resuelto


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

alrededor de 8 años hace

Resuelto


Compute Fibonacci Number
Compute the _n_-th Fibonacci Number f(0) = 0, f(1) = 1, f(2) = 1, f(3) = 2, ... f(42) = 267914296

alrededor de 8 años hace

Resuelto


Fibonacci-Sum of Squares
Given the Fibonacci sequence defined by the following recursive relation, * F_n = F_(n-1) + F_(n-2) * where F_0 = 0 and F_1 ...

alrededor de 8 años hace

Resuelto


Find out magnitude of vector
Find out magnitude of vector. Say x=[1 2 3], then answer must sqrt(1^2+2^2+3^2) Please don't use sum function. If you l...

alrededor de 8 años hace

Resuelto


Given a matrix, return the last eigen value
Given a matrix, return the first eigen value For example: x = magic(5) 17 24 1 8 15 23 5 7 14 ...

alrededor de 8 años hace

Resuelto


Bridge toll
Complete the example to calculate finalToll. The base toll for a bridge is baseToll. If the vehicle's weight is over 5,000 pound...

alrededor de 8 años hace

Resuelto


peta to nano (x-ray)
for certain x-ray radiation, given frequency in petahertz, give wavelength in nanometer, must be accurate +/- 25%

alrededor de 8 años hace

Resuelto


Extracting data: Heart rate (pulse)
The resting heart rate for an average adult is 60 - 100 beats per minute. Assign row array heartExtracted with all values in row...

alrededor de 8 años hace

Resuelto


Tree Height
Assign treeHeight with the tree height given the shadow length and angle of elevation. Simple geometry can compute the heigh...

alrededor de 8 años hace

Resuelto


Computing wind chill
On a windy day, a temperature of 15 degrees may feel colder, perhaps 7 degrees. The formula below calculates the "wind chill," i...

alrededor de 8 años hace

Resuelto


Generate the sum of Squares of the given number
|P(n) = 1^2 + 2^2 + ... + n^2| |P(1) = 1| |P(2) = 1 + 4 = 5;| |P(3) = 5 + 9 = 14;| |P(4) = 14 + 16 = 30;|

alrededor de 8 años hace

Resuelto


Determine if a row vector has NaN
Determine if a row vector x has NaN

alrededor de 8 años hace

Resuelto


Create a Standard Size Vector
Given an input x, create a row vector y from 1 to x with 5 elements.

alrededor de 8 años hace

Resuelto


Values in Array
How many values are in the array

alrededor de 8 años hace

Resuelto


MATLAB Basic: rounding II
Do rounding nearest integer. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 9

alrededor de 8 años hace

Resuelto


Calculate the peak value of square wave
Given the peak value of sine wave, calculate corresponding peak value of square wave, if both have same RMS voltage.

alrededor de 8 años hace

Resuelto


Basic commands - rounding
make a function which will round to integer, which is nearer to zero. Example x=[-2.5 2]; y=[-2 2];

alrededor de 8 años hace

Resuelto


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

alrededor de 8 años hace

Resuelto


Powers Of
Fill the vector with powers of 2, so that vector(1) is 2^1, vector(2) is 2^2, etc. Stop with vector(10). Complete the function ...

alrededor de 8 años hace

Resuelto


Matlab Basics II - Determine if an array has a 3rd dimension
For an array A, determine whether it has 3 dimensions, return 0 if x is only 2D, and 1 if x is 3D

alrededor de 8 años hace

Resuelto


Computing Wind chill
On a windy day, a temperature of 15 degrees may feel colder, perhaps 7 degrees. The formula below calculates the "wind chill," i...

alrededor de 8 años hace

Resuelto


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

alrededor de 8 años hace

Resuelto


Make a vector of prime numbers
Input(n) - length of vector with prime numbers Output(v) - vector of prime numbers Example: * n=1; v=2 * n=3; v=[2 3 5...

alrededor de 8 años hace

Resuelto


Calculate the integral of the polynomial
for e.g. in = [3 2 1] out = [1 1 1 0]

alrededor de 8 años hace

Resuelto


Find out value of sine given by degree.
Find out value of sine given by degree. If theta=30, it's value must be 0.5.

alrededor de 8 años hace

Resuelto


Matlab Basics II - Minimum
Write a function that returns the minimum of each ROW of a matrix x example: x = [1 2 3; 4 5 6]; output [1;4];

alrededor de 8 años hace

Resuelto


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

alrededor de 8 años hace

Resuelto


Matlab Basics II - Free Fall
An object freely falling from rest under gravity covers a distance x given by: x = 1/2 gt^2 write a function that calculat...

alrededor de 8 años hace

Resuelto


Equality check: Number of bricks
Write an if statement that assigns deliveryComplete with 1 if bricksDelivered is equal to bricksExpected.

alrededor de 8 años hace

Resuelto


Matlab Basics - Set unwanted parts of a vector to zero
Consider a vector x, of length >= 7, write a script to set elements 2, 5, and 6 to zero. Example x = [1 2 3 4 5 6 7] --> ...

alrededor de 8 años hace

Cargar más