Solved


Find the slope of a line that passes through two vectors
Given two vectors p1 and p2, return the slope of a line that passes through p1 and p2. Examples: Input [p1,p2] = deal([0,1],[...

3 years ago

Solved


Find unique number in input
Find value that occurs in odd number of input elements.

3 years ago

Solved


Draw a X
Given an input , create a square matrix of zeros with an X of ones. Ex. n = 3 drawX(3) [ 1 0 1 0 1 0 1 0 1 ] ...

3 years ago

Solved


step function

3 years ago

Solved


sign function

3 years ago

Solved


03 - Matrix Variables 3
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3c.png>> A 10x10 matrix where the numbers from 1 to 100 ...

3 years ago

Solved


Divisors of an integer
Given a number N, return a vector V of all integers that divide N. For example, N = 10 Then V=[1 2 5 10]

3 years ago

Solved


Count ones
Write a program to count number of ones (1s) in an integer variable input. For example: Input x=2200112231 output y=3 I...

3 years ago

Solved


persistant sum
There will be 9 tests for this problem. In each test you will be provided with 2 integers n=[n1,n2], where n2 is equal to t...

3 years ago

Solved


Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

3 years ago

Solved


Array of Ones
Create a 100 X 100 array of ones.

3 years ago

Solved


Matrix to column conversion
Given a matrix of any size, convert it into a column vector. e.g A=[10 20 30; 40 50 60] then, B = [10; 40; ...

3 years ago

Solved


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

3 years ago

Solved


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

3 years ago

Solved


Convert a vector into numbers
Suppose a vector x = [ 1 2 4 7] is given. You have to convert this vector into string number y = '1247'. Examples x = [ 1...

3 years ago

Solved


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

3 years ago

Solved


Babylonian method
Calculate the square root of a given positive number a using the Babylonian method (https://en.wikipedia.org/wiki/Methods_of_co...

3 years ago

Solved


Dice roll - opposite faces
For this problem, you will be provided with the values of a dice roll (regular six-sided dice). The number of dice will be at le...

3 years ago

Solved


Rotate counterclockwise a matrix 90 deg with left-bottom element
Example: Input [ 1 2 3 4 5 6 ] Output [ 3 6 2 5 1 4 ]

3 years ago

Solved


Minkowski distance

3 years ago

Solved


Return longest string in 1-D array of strings
Find the longest string in an array of strings. Return an empty string if the initial array is empty. If there are multiple stri...

3 years ago

Solved


Sort vector by number of prime factors of each element
Sort a given array based on how many prime factors each term has. Sort from least to greatest and output original values. Ex: ...

3 years ago

Solved


Find the number of primes leq than input
Given an integer n, determine the number of primes less than or equal to n.

3 years ago

Solved


Random Problem14 - Multiply a vector by a scalar of 2
Multiply a vector by a scalar of 2

3 years ago

Solved


RandomProblem13-Cube a number
Cube a number

3 years ago

Solved


Add the number of horizontal and vertical movements to each matrix element
Given n, create a square matrix and with element (1,1) = 1, add 1 to each element for each horitizonal and vertical movement. E...

3 years ago

Solved


Remove Lower Case Letters
Example MEMOry --> MEMO IMPlEMeNtATiON --> IMPEMNATON

3 years ago

Solved


Remove Upper Case Letters
Example Matlab --> atlab proBlem --> prolem Enter --> nter

3 years ago

Solved


All your base are belong to us
Find the base _b_ logarithm of the input decimal number _x_. Express the output as a decimal number. The first argument is the n...

3 years ago

Load more