Risolto

Draw 'D'.

Draw a x-by-x matrix 'D' using 0 and 1. example: x=4 ans= [1 1 1 0 1 0 0 1 1 0 0 1 1 1 1 0]

7 mesi fa

Risolto

Draw 'C'.

Given x as input, generate a x-by-x matrix 'C' using 0 and 1. example: x=4 ans= [0 1 1 1 1 0 0 0 ...

7 mesi fa

Risolto

Draw 'B'

Draw a x-by-x matrix 'B' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 0 1 0 0 0 1 ...

7 mesi fa

Risolto

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 mesi fa

Risolto

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 mesi fa

Risolto

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 mesi fa

Risolto

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 mesi fa

Risolto

Calculate a Damped Sinusoid

The equation of a damped sinusoid can be written as |y = A.ⅇ^(-λt)*cos(2πft)| where |A|, |λ|, and |f| ...

8 mesi fa

Risolto

Solve a System of Linear Equations

Example: If a system of linear equations in x₁ and x₂ is: 2x₁ + x₂ = 2 x₁ - 4 x₂ = 3 Then the coefficient matrix (A) is: 2 ...

8 mesi fa

Risolto

Verify Law of Large Numbers

If a large number of fair N-sided dice are rolled, the average of the simulated rolls is likely to be close to the mean of 1,2,....

8 mesi fa

Risolto

Integer Sequence - II : New Fibonacci

Crack the following Integer Sequence. (Hints : It has been obtained from original Fibonacci Sequence and all the terms are also ...

8 mesi fa

Risolto

Return fibonacci sequence do not use loop and condition

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

8 mesi fa

Risolto

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 mesi fa

Risolto

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

8 mesi fa

Risolto

Calculate Inner Product

Given two input matrices, |x| and |y|, check if their inner dimensions match. * If they match, create an output variable |z|...

8 mesi fa

Risolto

Calculate BMI

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

8 mesi fa

Risolto

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

8 mesi fa

Risolto

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

8 mesi fa

Risolto

Sum of series

a(n) = n^2 - (n-1)^2 find the summation of the series upto n i.e. a(1)+a(2)+...+a(n)

8 mesi fa

Risolto

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 mesi fa