Gelöst


Arrange vector in ascending order
Arrange a given vector in ascending order. input = [4 5 1 2 9]; output = [1 2 4 5 9];

etwa 10 Jahre vor

Gelöst


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.

etwa 10 Jahre vor

Gelöst


length of a vector
Find twice the length of a given vector.

etwa 10 Jahre vor

Gelöst


Output any real number that is neither positive nor negative
Output any real number that is neither positive nor negative

etwa 10 Jahre vor

Gelöst


Arithmetic array operations
* Add x to each element of array temperatureReadings.

etwa 10 Jahre vor

Gelöst


Function definition: Double down.
* Complete the DoubleDown function to return twice the initialValue.

etwa 10 Jahre vor

Gelöst


Computing wind chill
On a windy day, a temperature of 15 degrees may feel colder, perhaps 7 degrees. The formula below calculates the "wind chill," i...

etwa 10 Jahre vor

Gelöst


Logic variables
* Assign isAvailable with true.

etwa 10 Jahre vor

Gelöst


Function definition: BMI calculator
Define a function CalculateBMI with inputs massKg and heightCm. The function returns bodyMassIndex. The function should be able ...

etwa 10 Jahre vor

Gelöst


Plus x: A first program
_Solve this problem in Mathwork's online Cody system._ Write a statement that assigns y with 5 plus x. Ex: If input x = 2,...

etwa 10 Jahre vor

Gelöst


Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

etwa 10 Jahre vor

Gelöst


01 - Scalar variables
Create the following variables: <<http://samle.dk/STTBDP/Assignment1_1.png>>

etwa 10 Jahre vor

Gelöst


Sum the numbers on the main diagonal
Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

etwa 10 Jahre vor

Gelöst


Nth root.
* Assign outValues with the nth root of the inValues, the root is specified by rootValue

etwa 10 Jahre vor

Gelöst


03 - Matrix Variables 1
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3a.png>> A 9x9 matrix full of 2's (Hint: use *ones* o...

etwa 10 Jahre vor

Gelöst


05 - Vector Equations 1
Define the vector _cVec_: <<http://samle.dk/STTBDP/Assignment1_2c.png>> (all the numbers from 5 to -5 in increments of -0....

etwa 10 Jahre vor

Gelöst


only input
Return the output without writing any code into the function.

etwa 10 Jahre vor

Gelöst


Find the dimensions of a matrix
Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

etwa 10 Jahre vor

Gelöst


Assigning a sum
* Write a statement that assigns numCoins with numNickels + numDimes.

etwa 10 Jahre vor

Gelöst


Try 1.5.4: Celsius to Fahrenheit
Write a program to convert an input given in Celsius to Fahrenheit. Examples: Input celsiusValue = 100 Output fahrValu...

etwa 10 Jahre vor

Gelöst


Create a square matrix of multiples
Given an input, N, output a matrix N x N with each row containing multiples of the first element of each row. This also applies...

etwa 10 Jahre vor

Gelöst


Make a 1 hot vector
Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...

etwa 10 Jahre vor

Gelöst


Tree Height
Assign treeHeight with the tree height given the shadow length and angle of elevation. Simple geometry can compute the heigh...

etwa 10 Jahre vor

Gelöst


Construct an array
* Construct an row array named observedValues with elements sensorReading1, sensorReading2, and sensorReading3.

etwa 10 Jahre vor

Gelöst


Convert a vector into a number
This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

etwa 10 Jahre vor

Gelöst


Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the hourly wage times 40 and times 50, because annualSalary = hour...

etwa 10 Jahre vor

Gelöst


Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

etwa 10 Jahre vor

Gelöst


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

etwa 10 Jahre vor

Gelöst


Check if number exists in vector
Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

etwa 10 Jahre vor

Gelöst


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

etwa 10 Jahre vor

Mehr laden