Gelöst


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

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


Total energy

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


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;

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


Laws of motion 6

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


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)

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


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

6 Monate vor