Risolto


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

12 mesi fa

Risolto


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

12 mesi fa

Risolto


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the numbers. Otherwise return false. Example...

12 mesi fa

Risolto


Return area of square
Side of square=input=a Area=output=b

12 mesi fa

Risolto


Add two numbers
Given a and b, return the sum a+b in c.

12 mesi fa

Risolto


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

12 mesi fa

Risolto


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

12 mesi fa

Risolto


Estimating Monthly Electricity Cost for a Household Appliance
You recently bought an electric kettle for your kitchen, and you want to estimate how much it costs to run every month. The kett...

12 mesi fa

Risolto


Pi Digit Probability
Assume that the next digit of pi constant is determined by the historical digit distribution. What is the probability of next di...

12 mesi fa

Risolto


Triangle sequence
A sequence of triangles is constructed in the following way: 1) the first triangle is Pythagoras' 3-4-5 triangle 2) the second...

12 mesi fa

Risolto


Birthday cake
It's Cody's 5th birthday, and you've been tasked with putting the candles on the cake. Your goal is to maximize the distance bet...

12 mesi fa

Risolto


Sum of Even Fibonacci Numbers
Description: The Fibonacci sequence is defined as follows:F(1)=1,F(2)=1,F(n)=F(n−1)+F(n−2) for n>2 Write a function that compu...

12 mesi fa

Risolto


Create a matrix map of increasing safety levels
The sole nuclear power plant at Grid City suddenly had a meltdown. Luckily, the plant was designed to be in full automation, so ...

12 mesi fa

Risolto


Create the following sequence : 0 1 1 4 9 25 64 169 ...
The sequence 0, 1, 1, 4, 9, 25, 64, 169, ... represents the square of the sequence of Fibonacci numbers. Let n repres...

12 mesi fa

Risolto


Characterize fluid flow in a pipe as to laminar or turbulent
In fluid mechanics, characterizing the flow in a pipe is essential to predicting its behavior. The flow pattern can either be la...

12 mesi fa

Risolto


Battery Charge Efficiency Calculation
In a Battery Management System (BMS), the efficiency of battery charging can be estimated using the formula: where: is the...

12 mesi fa

Risolto


Count the number of folds needed to pack a large sheet
In a certain paper factory, large sheets of paper are being made every day. Before sending the sheets for shipment, they have to...

12 mesi fa

Risolto


Pizza!
Given a circular pizza with radius z and thickness a, return the pizza's volume. [ z is first input argument.] Non-scored bonus...

12 mesi fa

Risolto


Roll the Dice!
Description Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. Example [x1,x2] = rollDice(...

12 mesi fa

Risolto


Make a Plot with Functions
Make a plot and test

12 mesi fa