A résolu


Luggage delivery
Assign deliveryCost with the cost to deliver a piece of baggage weighing baggageWeight. The service charges twenty dollars for ...

environ 9 ans il y a

A résolu


Health app
A health app records a user's weight and displays the change in weight from the previous measurement to the next. Assign weightC...

environ 9 ans il y a

A résolu


Travel speed
Write an anonymous function to compute the Euclidean distance given two points (x1, y1) and (x2, y2). Use the following equation...

environ 9 ans il y a

A résolu


Finding values in arrays
Assign numMatches with the number of elements in userValues that equal matchValue. Ex: If matchValue = 2 and userVals = [2, ...

environ 9 ans il y a

A résolu


For loops: Odds sum
Write a for loop that assigns summedValue with the sum of all odd values from 1 to userNum. Assume userNume is always greater th...

environ 9 ans il y a

A résolu


Calculate volume of box
Calculate the volume of box,hiven its sides

environ 9 ans il y a

A résolu


Box!
Given a box, find the volume of the cube. With each side = a.

environ 9 ans il y a

A résolu


Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

environ 9 ans il y a

A résolu


The prisoner
"We want information, information, information." "Who are you?" Input can be a string or a number (array).

environ 9 ans il y a

A résolu


Find x in provided equation!
x^2-2*x+1=0 This polynomial can be expressed by using each term's coefficients, such as [1 -2 1]. Using the polynomial ...

environ 9 ans il y a

A résolu


Detect pair of equal values in a Matrix
A 2D matrix of 2 rows and N columns with random integer numbers. A = [3 1 2 4 6 6 7; 7 3 2 1 5 2 4] ...

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


poll: would you like the regexp (?@cmd) functionality to be banned in Cody?
This problem is a poll (and a little bit of "white hat hacktivism" as well) regarding Cody users sentiment about the use of rege...

environ 9 ans il y a

A résolu


While loop: Summation
Write a while loop that assigns summedValue with the sum of all values from 1 to userNum. Assume userNum is always greater than ...

environ 9 ans il y a

A résolu


Replacing a row
For matrix G=[1 2 3; 4 5 6; 7 8 9] Replace the 2nd row with 8s **remember to create matrix G

environ 9 ans il y a

A résolu


Writing a while loop
Write a while loop that continues to increment userValue by 5 until userValue is less than 0.

environ 9 ans il y a

A résolu


Solve the set of simultaneous linear equations
Given this pair of simultaneous linear equations: 2x + 3y = 23 3x + 4y = 32 Find the solution set (x,y)

environ 9 ans il y a

A résolu


Writing a function: MaxValue()
Write a local function named MaxValue that returns the maximum of two inputs numA and numB.

environ 9 ans il y a

A résolu


Multiple if statements
Write an if-statement that subtracts 5 from outputValue if amplitudeResponse is greater than 10. Write a second if-statement tha...

environ 9 ans il y a

A résolu


Binary Coder
Take an input number and print the binary value of this number.

environ 9 ans il y a

A résolu


Find the logic
There exists one logic in between input and output. Find it (easy math). Example 1: x=13 then y=339; Example 2: x=26...

environ 9 ans il y a

A résolu


Colon operator of two vectors
You are given two vectors of equal length: VecStart, VecEnd Each vector contain a set of integers, where VecEnd(j)>=VecStar...

environ 9 ans il y a

A résolu


Create a function handle that reverses the input arguments of another function handle
Given a function that takes two input arguments and returns one output, create another function handle that performs the same op...

environ 9 ans il y a

A résolu


Preset rpm speeds
A centrifuge has four preset speeds. Write a switch statement that assigns rpmSetting with the appropriate rpm speed given prese...

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


Switch matrix to a column vector
for e.g. x = [1 2 3 4] y = 1 3 2 4

environ 9 ans il y a

A résolu


matrix of natural number
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 resides seially as shown in the examples below. ...

environ 9 ans il y a

A résolu


ASCii Code
Using Matlab get the ASCii for '?'

environ 9 ans il y a

A résolu


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

environ 9 ans il y a

A résolu


surrounded matrix
With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...

environ 9 ans il y a

Charger plus