Solved


Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...

8 months ago

Solved


How many Fibonacci numbers?
Find the number of unique Fibonacci numbers (don't count repeats) in a vector of positive integers. Example: x = [1 2 3 4...

8 months ago

Solved


Project Euler: Problem 2, Sum of even Fibonacci
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...

8 months ago

Solved


Number of Even Elements in Fibonacci Sequence
Find how many even Fibonacci numbers are available in the first d numbers. Consider the following first 14 numbers 1 1 2...

8 months ago

Solved


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

8 months ago

Solved


Numerical Integration
Input * |x0|, a real number greater than 0 Output * |I|, a numerical estimate of the integral x0 / I...

8 months ago

Solved


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

8 months ago

Solved


Plotting Practice
Plot cos(x) vs x as shown in the figure below. Include the appropriate title, x-label, and y-label. Note, it is case sensitive. ...

8 months ago

Solved


Make a Plot with Functions
Make a plot and test

8 months ago

Solved


Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...

8 months ago

Solved


Rescale Scores
Each column (except last) of matrix X contains students' scores in a course assignment or a test. The last column has a weighted...

8 months ago

Solved


Calculate Inner Product
Given two input matrices, x and y, check if their inner dimensions match. If they match, create an output variable z which cont...

8 months ago

Solved


Find MPG of Lightest Cars
The file cars.mat contains a table named cars with variables Model, MPG, Horsepower, Weight, and Acceleration for several classi...

8 months ago

Solved


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

8 months ago

Solved


Crop an Image
A grayscale image is represented as a matrix in MATLAB. Each matrix element represents a pixel in the image. An element value re...

8 months ago

Solved


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

8 months ago

Solved


Plot Damped Sinusoid
Given two vectors |t| and |y|, make a plot containing a blue ( |b| ) dashed ( |--| ) line of |y| versus |t|. Mark the minimum...

8 months ago

Solved


Calculate a Damped Sinusoid
The equation of a damped sinusoid can be written as y = A.ⅇ^(-λt)*cos(2πft) where A, λ, and f are scalars and t is a vector. ...

8 months ago

Solved


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

8 months ago

Solved


Convert from Fahrenheit to Celsius
Given an input vector F containing temperature values in Fahrenheit, return an output vector C that contains the values in Celsi...

8 months ago

Solved


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

8 months ago

Solved


Inner product of two vectors
Find the inner product of two vectors.

9 months ago

Solved


Chess probability
The difference in the ratings between two players serves as a predictor of the outcome of a match (the <http://en.wikipedia.org/...

9 months ago

Solved


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

9 months ago

Solved


Remove a specific row with max value
Remove the row that contain the max value in the matrix? If you like the problem, please like it :)

10 months ago

Solved


sum numbers to some value n
sum of numbers up to a value n

10 months ago

Solved


Generate a random matrix A of (1,-1)
Input n: is an positive integer which serves as the dimension of the matrix A; Output: A=(Aij),where each entry Aij is either...

10 months ago

Solved


Find the maximum number of decimal places in a set of numbers
Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not count...

10 months ago

Solved


Make roundn function
Make roundn function using round. x=0.55555 y=function(x,1) y=1 y=function(x,2) y=0.6 y=function(x,3) ...

10 months ago

Solved


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

10 months ago

Load more