Gelöst


Basic commands - Least common multiple
Make a function which will return least common multiple of "a" and "b" Example: a=8; b=6; y=24;

fast 4 Jahre vor

Gelöst


prime test
find largest 2 digit prime number

fast 4 Jahre vor

Gelöst


prime test 2
enter the only non prime,non composite number

fast 4 Jahre vor

Gelöst


What percentage?
Calculate the output c as the percentage of a on b for given a and b.

fast 4 Jahre vor

Gelöst


vectorization in N
For a given integer n (n>1), compute the sum f (i) (1 <= i <= n) where f (i) = 1 if n is odd and 2 otherwise.

fast 4 Jahre vor

Gelöst


No Twins?
Write a function that accepts as input a vector and returns the same vector, but retaining only the first occurrence of an eleme...

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


Finding perimeter of a rectangle
A rectangle has a length of x centimeters and a width of w centimeters. Find the perimeter.

fast 4 Jahre vor

Gelöst


Remove the Zero
Given an array n, remove all zeros

fast 4 Jahre vor

Gelöst


Sort numbers by outside digits
Sort the array so that they are sorted as if their value was a 5 digit number made from the first three and last two digits of t...

fast 4 Jahre vor

Gelöst


Another colon problem
This is simple problem based on problems 555, 801, 1118, etc. Create an index vector from two input vectors. Example: ...

fast 4 Jahre vor

Gelöst


Max Change in Consecutive Elements
If an array is given as input then find the index of consecutive elements that represent maximum change. Example: Input ...

fast 4 Jahre vor

Gelöst


Is It a Palindrome?
Given a string or array, determine if it is a palindrome.

fast 4 Jahre vor

Gelöst


Remove and Sort
Given a randomized array n, sort it and remove all odd integers. n=5 y = [2 4]

fast 4 Jahre vor

Gelöst


Find the Pattern 10

fast 4 Jahre vor

Gelöst


Divisible by 8
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

fast 4 Jahre vor

Gelöst


How unique?
Sometimes, when we check unique entries of vector we would like to know how many times each value occurs. Given vector of num...

fast 4 Jahre vor

Gelöst


Find the index of n in magic(n)
If input n=5, then magic(n) is 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22...

fast 4 Jahre vor

Gelöst


Replace pattern 0 1 0 and 1 0 1
Find and replace a pattern in a row of zeroes and ones. * Find 1 0 1 and replace it with 1 1 1 * Find 0 1 0 and replace it w...

fast 4 Jahre vor

Gelöst


Largest territory
Determine whose territory is largest. If there are multiple numbers tied for the largest territory, return the smallest number. ...

fast 4 Jahre vor

Gelöst


counting groups!
This problem is about counting groups. Example If you have x: x = [0.8 0.8 0.8 0.3 0.3 0.4 0.5 0.6 0.6 0.9] then a...

fast 4 Jahre vor

Gelöst


Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

fast 4 Jahre vor

Gelöst


Maximum running product for a string of numbers
Given a string s representing a list of numbers, find the five consecutive numbers that multiply to form the largest number. Spe...

fast 4 Jahre vor

Gelöst


Basic commands - amount of inputs
Make a function, which will return amount of given inputs Example: amountinput(1,2,4,3,10) -> 5 , because we gave functio...

fast 4 Jahre vor

Gelöst


Product of elements in row
Product of matrix such that a=[3 3 1] b=9

fast 4 Jahre vor

Gelöst


Basic commands - Greatest common divisor
Please write a function, which, will put as output greatest common divisor. Example: A = [-5 17; 10 0];...

fast 4 Jahre vor

Gelöst


MATCH THE STRINGS (2 CHAR) very easy
Match the given string based on first two characters on each string. For example A='harsa'; b='harish'; result '1' ...

fast 4 Jahre vor

Gelöst


Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10. For example, if you add the di...

fast 4 Jahre vor

Gelöst


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]

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

fast 4 Jahre vor

Mehr laden