Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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.

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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]

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Carica altro