Resuelto


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

4 meses hace

Resuelto


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

4 meses hace

Resuelto


Total energy

4 meses hace

Resuelto


Basic commands - Greatest common divisor
Please write a function, which, will put as output greatest common divisor. Example: A = [-5 17; 10 0];...

4 meses 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];

4 meses hace

Resuelto


Basic commands - amount of inputs
Make a function, which will return amount of given inputs Example: amountinput(1,2,4,3,10) -> 5 , because we gave functio...

4 meses hace

Resuelto


Basic commands - Least common multiple
Make a function which will return least common multiple of "a" and "b" Example: a=8; b=6; y=24;

4 meses hace

Resuelto


BASICS - sum part of vector
Please make a function, where as input you get vector "x" and and vector "c", where in "c" vector you get indexes to sum. Examp...

4 meses hace

Resuelto


cross in array
Make a cross from "1" in odd size array. Other value from array should be equal to "0"; As input you get length of side of arra...

4 meses hace

Resuelto


angle in regular polygon
Make a function which returns measure of interior angle in x-side regular polygon. x is as input. Please pay attention, that 1 ...

4 meses hace

Resuelto


Create a vector
Create a vector from 0 to n by intervals of 2.

4 meses hace

Resuelto


What's size of TV?
Many people buy TV. Usually they ask about diagonal. But also important are width and height. Let's assume that all TV have rati...

4 meses hace

Resuelto


Laws of motion 6

4 meses hace

Resuelto


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

4 meses hace

Resuelto


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

4 meses hace

Resuelto


Ohm’s Law - Calculate Resistance
Ohm’s Law states that resistance R can be calculated as:R=V/I​ where: V is the voltage (in volts) I is the current (in ampere...

4 meses hace

Resuelto


Simple Electrical Power Calculation
Calculate the electrical power using the formula: P=V×I where: V is the voltage (in volts) I is the current (in amperes)

4 meses hace

Resuelto


Length of a short side
Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...

4 meses hace

Resuelto


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<https://i.imgu...

4 meses hace

Resuelto


Is my wife right?
Regardless of input, output the string 'yes'.

4 meses hace

Resuelto


Dimensions of a rectangle
The longer side of a rectangle is three times the length of the shorter side. If the length of the diagonal is x, find the width...

4 meses hace

Resuelto


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

4 meses hace

Resuelto


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

4 meses hace

Resuelto


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

4 meses hace

Resuelto


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

4 meses hace

Resuelto


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

4 meses hace

Resuelto


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

4 meses hace

Resuelto


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

4 meses hace

Resuelto


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

4 meses hace

Resuelto


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

4 meses hace