Gelöst


Select every other element of a matrix
Write a function called outMat = odd_idx( myMat ) that takes a matrix, myMat, as input argument and returns a matrix th...

etwa 9 Jahre vor

Gelöst


Vector addition
Given two row vectors, v1 and v2, each representing an integer, such that the vector elements are the digits from left to right,...

etwa 9 Jahre vor

Gelöst


Linear system of equations
Solve the system of equations in three variables.

etwa 9 Jahre vor

Gelöst


Pad zero between every adjacent values of the vector.
you are given a vector x. you have to make an output vector y with zeros padded between every adjacent values of x. e.g x: ...

etwa 9 Jahre vor

Gelöst


Repeat the entries of the vector to their reference times in the vector.
e.g for input x: [ 7 3 9 5] output y: [ 7 3 3 9 9 9 5 5 5 5]

etwa 9 Jahre vor

Gelöst


S-T-R-E-T-C-H I-T O-U-T
You will be given a row of numbers (x), and a single number (n). Your job is to write a script that will stretch out the row of...

etwa 9 Jahre vor

Gelöst


Sum of digits of powers of 2
Given n, first, calculate the number 2^n. Then, sum the digits that comprise that number. For example: Input: n = 7 2^n = ...

etwa 9 Jahre vor

Gelöst


Odd row
Create a row 'y' with odd numbers where the potential maximum number is given by 'x' and the space between them by 'm'. The firs...

etwa 9 Jahre vor

Gelöst


Back to Basics - New Data Type in R2016b - convert a char to a string
Convert an char array into a string.

etwa 9 Jahre vor

Gelöst


kmph to mph converter
Convert the speed in miles/hour to km/hour.

etwa 9 Jahre vor

Gelöst


Convert a vector to a lower triangular matrix
I now have a row vector and I want to convert it to a lower trilangular matrix. The rows of the lower trilangular matrix have...

etwa 9 Jahre vor

Gelöst


Beat the test suite if you can :)
Solve this problem based on clues in the test suite.

etwa 9 Jahre vor

Gelöst


Rotate array 90 degrees
Rotate the given matrix by 90 degrees. Example, A = [1 2 3 ; 4 5 6 ] B = rotated(A) = [ 3 6; 2 5; 1 4 ]

etwa 9 Jahre vor

Gelöst


Number of primes
Count the number of primes less than 'n'.

etwa 9 Jahre vor

Gelöst


Check if a string starts with another string
Input s='He was so tired' q='He' Output ans = true

etwa 9 Jahre vor

Gelöst


Simple polynomial evaluation
Compute the value of a polynomial of degree n with all coefficients '1', at value x. n is always n>=0. p(x)=1+x+x^2+...+x^n...

etwa 9 Jahre vor

Gelöst


Iterative sum of digits of 2^n number
Given n, calculate the number 2^n (where n>=0) and *iterate* until the sum of the digits is a single-digit number. Example: ...

etwa 9 Jahre vor

Gelöst


Polynomial evaluation
Compute the value of a polynomial of degree n with coeffcients in vector a, at value x. p(x)=a(1)+a(2)x+a(3)x^2+...+a(n+1)x...

etwa 9 Jahre vor

Gelöst


Convert decimal to hex as shown in test cases
Convert decimal to hex as shown in test cases.

etwa 9 Jahre vor

Gelöst


Find the diagonal of the square of side L
You are given a square of side length L, find D the length of its diagonal.

etwa 9 Jahre vor

Gelöst


Create a constant offset.
Add a constant offset to an array. Example a = [1 3 5 9] offset = 2 y = [3 5 7 11]

etwa 9 Jahre vor

Gelöst


Non trivial identities - flipping
Return x by flipping it.

etwa 9 Jahre vor

Gelöst


Non trivial identities - summation
Return x by adding a random number to it.

etwa 9 Jahre vor

Gelöst


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

etwa 9 Jahre vor

Gelöst


BaeIsAlwaysRight
Output yes whatever bae says

etwa 9 Jahre vor

Gelöst


Convert decimal to binary and then generate the minimum binary it can with jumbling
input is 10 --> 1010 output should be 3 --> 0011 input 23 --> 10111 output should be 15 --> 01111

etwa 9 Jahre vor

Gelöst


Freebies anyone? No!!!!
Feel free to copy paste all the tests and voila you solved the problem

etwa 9 Jahre vor

Gelöst


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

etwa 9 Jahre vor

Gelöst


Wrap-around effect
In vector x of length n we define (n+1) position as going back to the first position (so called wrap-around effect). Can you ret...

etwa 9 Jahre vor

Gelöst


Maximum of ND-array
Find the maximum element of a N dimensional array. Example: A=[1 2 4 ; -20 4 10]; The maximum is 10.

etwa 9 Jahre vor

Mehr laden