Gelöst


Generate binary combinations for a given number of bit(s)
Generate the binary combination as in the example below. Example: If you are given: bin_comb(2) The answer will be: ...

fast 4 Jahre vor

Gelöst


Put Two 1D matrices into one 1D matrix
Example: If input a = [1 2 3 4 5]; input b = [10 9 8 7 6]; then output will be, y_correct = [1 10 2 9 3 8 4 7 5...

fast 4 Jahre vor

Gelöst


Combination logic
Create an algorithm in MATLAB that calculate the combination for the given positive integers n and k as inputs. When k > n, the ...

fast 4 Jahre vor

Gelöst


Power The Product
EXAMPLE: INPUT x=10 & y=10 OUTPUT z=1000000 or, INPUT x=2 & y=3 OUTPUT z= 216 you just need to calculate the product first...

fast 4 Jahre vor

Gelöst


JOIN STRINGS
There are two given strings 'STRING1' and 'STR ING2'.|monospaced|The output should be 'STRING1 STR ING2' or STr1='Sum';STr2='EQU...

fast 4 Jahre vor

Gelöst


COUNT VOWEL
Count, how many times vowels occurred. EXAMPLE: x='string the MaTLaBiAn' then the answer will be 6. x='coUnt the vowEl' th...

fast 4 Jahre vor

Gelöst


Do operation as per given string
Do operation as per given string Example: '3*5' then answer must be 15; '3+5' then answer must be 8; '35' then answer ...

fast 4 Jahre vor

Gelöst


Find out magnitude of vector
Find out magnitude of vector. Say x=[1 2 3], then answer must sqrt(1^2+2^2+3^2) Please don't use sum function. If you l...

fast 4 Jahre vor

Gelöst


Solve Linear equations
Solve Linear equations Example: x+y=2 and x+2y=3, then x and y equal to 1.

fast 4 Jahre vor

Gelöst


Create an anti-identity matrix
Create an anti-identity matrix of given dimension. Examples n = 2 A = [0 1; 1 0] n = 3 A = [0 0 1; 0 1 0; 1 0 0...

fast 4 Jahre vor

Gelöst


Generate vector according to sign of vector
Generate vector according to sign of vector Example: If A=[-2 0 5] then output must be[-1 0 1] meaning that for negative n...

fast 4 Jahre vor

Gelöst


Cancel Middle
Write a function called cancel_middle that takes A, an n-by-m matrix, as an input where both n and m are odd numbers an...

fast 4 Jahre vor

Gelöst


Sort in descending order.

fast 4 Jahre vor

Gelöst


Find 100 from a Matrix and Replace With 0 with less computation time
pls use this matrix x = [208 40 167 180 112 70 192 215 90 19 231 100 9 100 97 100 ...

fast 4 Jahre vor

Gelöst


Find the nearest prime number
Happy 5th birthday, Cody! Since 5 is a prime number, let's have some fun looking for other prime numbers. Given a positive in...

fast 4 Jahre vor

Gelöst


Find Out sum of principal diagonal element of given matrix
Find out sum of principal diagonal element of given matrix If A=[1 0 0; 0 1 0;0 0 1], then answer must be 3.

fast 4 Jahre vor

Gelöst


Sideways sum
Given natural number calculate its _population count_.

fast 4 Jahre vor

Gelöst


Volume difference between Ellipsoid and Sphere
Given an ellipsoid of semi principal axis (a,b,c) find the volume of the difference between this ellipsoid and the sphere with...

fast 4 Jahre vor

Gelöst


MinMax
* x=[2 4 3 1 6 4 6] * output , y=[1 6 2 4 3] here,y(1) is the minimum of x, y(2) is the maximum of x, y(3) is the 2nd mini...

fast 4 Jahre vor

Gelöst


King's Cage
Given the position of the king on the chessboard, determine the minimum number of steps it'll require to reach the destination. ...

fast 4 Jahre vor

Gelöst


Summing Rows and Columns
Create a matrix y of size (n+1) whose last column's elements are the summation of the elements of all the other columns and last...

fast 4 Jahre vor

Gelöst


Count digits
Count total number of digits from 1 to n. * n=13 * output=17 since from [1-9] total 9 digits.[10-13] total 4*2=8 digits.

fast 4 Jahre vor

Gelöst


generate the matrix
given 3 inputs e.g [2,3,4] -- generate a matrix like below -- [2 2 0 0 0 0 0 0 0; 2 2 0 0 0 0 0 0 0; 0 0 3 3 3 0 0 0 0; 0 0...

fast 4 Jahre vor

Gelöst


GCD

fast 4 Jahre vor

Gelöst


Tribonacci Sequence
Generate the tribonacci sequence upto n

fast 4 Jahre vor

Gelöst


Zero
given an integer a, find the smallest possible integer b(b>0) such that their bitwise logical AND is zero. * if a=11(1011) t...

fast 4 Jahre vor

Gelöst


MinMax mapping
Given a matrix, map all the elements within a given interval. For example, a=[ 2 5 10] mapped in the interval [1,2] ...

fast 4 Jahre vor

Gelöst


generate nth pentatope number
https://en.wikipedia.org/wiki/Pentatope_number

fast 4 Jahre vor

Gelöst


Back to basics 10 - Max Float
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive floating-point number MATLAB can han...

fast 4 Jahre vor

Gelöst


Which quadrant?
Given a complex number, output quadrant 'I' 'II' 'III' or 'IV' | II | I | ...

fast 4 Jahre vor

Mehr laden