A résolu


Display negative numbers
Given array,x, display all the negative numbers and display output as y. Example x=[1 -2 3 -4] , output is y=[-2 -4].

environ 7 ans il y a

A résolu


MPS to MPH
Given the speed in miles per second, find the speed in miles per hour.

environ 7 ans il y a

A résolu


"Power matrix" of two vectors
Given two row vectors x,y of lengths m and n (respectively), create an m x n matrix whose i,j entry is x(i)^y(j).

environ 7 ans il y a

A résolu


Probability of Choosing a Red Ball
Given two jars of red and blue balls, find the probability of choosing a red ball from Jar 1 after going through the steps. ...

environ 7 ans il y a

A résolu


All odd - all even
All odd numbers in x are added, while all even numers are subtracted from this. example: x = [1 2 3 4 5]; y = +(1+3+5)-...

environ 7 ans il y a

A résolu


Fill the Matrix - 2
Input is a column vector and n. n columns will be added to the left of the input column. The first value of the row is the me...

environ 7 ans il y a

A résolu


find "greatest common divisor" of two integer value
A function to find Greatest Common Divisor of two integer input E.G. x=-18 y=96 output should be +6 x=-18; y=96; >>your...

environ 7 ans il y a

A résolu


Whole Number Concatenator
Write a function that concatenates whole numbers. For example: numcat(111,222) should return 111222 numcat(1,2,3,4,5) s...

environ 7 ans il y a

A résolu


Average of even-numbered columns
Given a vector, find the average of even-numbered columns. e.g x = [ 4 6 8 9 1 2 7 ] y = ( 6 + 9 + 2 ) / 3

environ 7 ans il y a

A résolu


Odd times 3
Given a input matrix x, multiply all odd values by 3. Even values remain the same. example: x = [1 2 3 4 5;... 6 7...

environ 7 ans il y a

A résolu


Determinants
Given a square matrix(A), find the determinant(d). For example: A = [1,3;4,5] d = 1*5-4*3 = -7

environ 7 ans il y a

A résolu


Remove multiples of N
in the vector x remove all multiples of N. x = [1 2 3 4 5 6]; N = 2; Then y = [1 3 5];

environ 7 ans il y a

A résolu


Number of divisors of a given number
Given a Number n, return the number of his divisors without listing them example: n=14 ; Divisors={1,7,2,14} ; y=4 n=...

environ 7 ans il y a

A résolu


surface of parallelogram
Given 2 vectors of each 3 elements, determine the surface of the parallelogram which can be created from these 2 vectors.

environ 7 ans il y a

A résolu


Maximum sum from any 2 numbers with a variable number of inputs
Given a variable number of inputs, combine any 2 numbers from the inputs and output the maximum sum the combinations can generat...

environ 7 ans il y a

A résolu


Calculating Ring Area
In two-dimensional space, a ring can be constructed by using two concentric circles. Determine the area of a ring which has r1 ...

environ 7 ans il y a

A résolu


How to Concatenate two strings?
How to Concatenate two strings?

environ 7 ans il y a

A résolu


Performance - summation
Given a vector of natural numbers x = [1,2,3,...,N] compute the sum of its elements by not stressing the machine too much...

environ 7 ans il y a

A résolu


square of a number
find square of a given number

environ 7 ans il y a

A résolu


Program an exclusive OR operation with logical operators
Program an exclusive or operation *without* using the MATLAB function xor. Use logical operators like |, &, ~, ... instead. ...

environ 7 ans il y a

A résolu


Number of vertices of a hypercube
Return the number of vertices of a n-dimensional hypercube.

environ 7 ans il y a

A résolu


Measure a Special Distance
Given an n-by-2 matrix with positive and negative numbers, return an n-by-n matrix in the manner of the function template.

environ 7 ans il y a

A résolu


Reverse Concatenation
Suggest methods to form a Matrix after deleting one of the input's elements. Input should be element's position and output shou...

environ 7 ans il y a

A résolu


square root
Find square root of given number

environ 7 ans il y a

A résolu


Component area
Find the area of the component below, all measurements are in mm <<https://image.ibb.co/hocruF/Component.png>>

environ 7 ans il y a

A résolu


Vector Element Multiplication
Take two incoming vectors, and output the element wise multiplication of the vectors.

environ 7 ans il y a

A résolu


Probability of red tulips
I hope to give you bulbs of tulip. But I do not know the color of those petals. I just know that the color is red, white or yell...

environ 7 ans il y a

A résolu


provide the numerical answer to these number questions...
return a row matrix containing the sorted numbers which answer the following questions: a) what is the first Knuth number to...

environ 7 ans il y a

A résolu


Path calculation with polynomials
Let a vector x be the input to our function. 1. If a value of an input vector element x is lower than 0, set this value to 0....

environ 7 ans il y a

A résolu


Replace 0 indices in array with 1's
Take a incoming vector, and replace 0's with ones

environ 7 ans il y a

Charger plus