Gelöst


Inner product of two vectors
Find the inner product of two vectors.

fast 5 Jahre vor

Gelöst


means
Calculate the arithmetic, the geometric and the harmonic mean of a given vector (with positive elements) and return them in a ve...

fast 5 Jahre vor

Gelöst


Percentage of zeros in a matrix of only 1s and 0s
Write a function called _zero_stat_ that takes a matrix as an input that only has 0 and 1 elements. The function needs to comput...

fast 5 Jahre vor

Gelöst


Product of all elements in an array
Compute the product of all elements in an array.

fast 5 Jahre vor

Gelöst


Basic Quadratic Equation
Create the equation: y=(3x)^2+(5x)+35 and compute y for various values of x

fast 5 Jahre vor

Gelöst


Perimeter of a semicircle
Given the diameter d, find the perimeter of a semicircle

fast 5 Jahre vor

Gelöst


Matrix FUN
Given a Matrix M, find out the number of elements of matrix that are divisible by 3. M = [1 2 3;4 5 6;7 8 9]; ou...

fast 5 Jahre vor

Gelöst


Half-Swap
Given a vector with an even number of elements, rearrange it so that the elements in its first half are switched with those i...

fast 5 Jahre vor

Gelöst


Factorial Numbers
Factorial is multiplication of integers. So factorial of 6 is 720 = 1 * 2 * 3 * 4* 5 *6 Thus 6 factorial = factorial(720)....

fast 5 Jahre vor

Gelöst


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

fast 5 Jahre vor

Gelöst


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

fast 5 Jahre vor

Gelöst


Square a Number
Given an input x, return y, which is equal to the square of x.

fast 5 Jahre vor

Gelöst


Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.

fast 5 Jahre vor

Gelöst


Min of a Matrix
Return the minimum value in the given matrix.

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

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

fast 5 Jahre vor

Gelöst


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

fast 5 Jahre vor

Gelöst


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

fast 5 Jahre vor

Gelöst


Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

fast 5 Jahre vor

Gelöst


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

fast 5 Jahre vor

Gelöst


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; ...

fast 5 Jahre vor

Gelöst


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

fast 5 Jahre vor

Gelöst


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

fast 5 Jahre 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:...

fast 5 Jahre 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.

fast 5 Jahre vor

Gelöst


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

fast 5 Jahre vor

Gelöst


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

fast 5 Jahre vor

Gelöst


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

fast 5 Jahre vor

Gelöst


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

fast 5 Jahre vor

Gelöst


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

fast 5 Jahre vor

Mehr laden