Community Profile

photo

Satadru Mukherjee


68 total contributions since 2019

Satadru Mukherjee's Badges

  • Commenter
  • Solver

View details...

Contributions in
View by

Solved


Implement a ROT13 cipher
Replace each character in string s1 with the character that is shifted 13 positions from it (wrap back to the beginning if neces...

4 days ago

Solved


Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

15 days ago

Solved


calculate linear convolution two vectors
for e.g in: a = [1 2 3] b = [4 5 6] out: y = [4 13 28 27 18]

1 month ago

Solved


Find the nearest integer
Given a vector of integers and a real number find the closest integer. EX: >> a = [2 4 5 6 8 10]; >> b = 4.6; >> nea...

1 month ago

Solved


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

1 month ago

Solved


Convert from integer to binary
if true % decimalToBinaryVector(x) end

1 month ago

Solved


Convert given decimal number to binary number.
Convert given decimal number to binary number. Example x=10, then answer must be 1010.

1 month ago

Solved


Create an 'arrow-head" matrix
Write a function that when given an odd number, produces an arrow-head function pointing to the right. Examples n = 3 ...

1 month ago

Solved


Calculate the Hamming distance between two strings
Inspired by a similar Cody problem found <http://www.mathworks.com/matlabcentral/cody/problems/93-calculate-the-levenshtein-dist...

1 month ago

Solved


Vector LCM
* Find Least Common Multiple of a given vector. * Need general solution as the test suite will be expanded. * Function Templa...

1 month ago

Solved


Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

2 months ago

Solved


Perfect Square or not
find Given input x is perfect square or not,if yes then output y=1.else y=0

2 months ago

Solved


Check if number exists in vector
Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

2 months ago

Solved


Reverse Run-Length Encoder
Given a "counting sequence" vector x, construct the original sequence y. A counting sequence is formed by "counting" the entrie...

2 months ago

Solved


Back to Basics - Find no. of elements in a matrix?
Let A be a m*n matrix. Find the total no. of elements in A ? (Hint - formula based) A = [1 2 3;4 5 6]; output = 6

2 months ago

Solved


Counting Sequence
Given a vector x, find the "counting sequence" y. A counting sequence is formed by "counting" the entries in a given sequence...

2 months ago

Solved


Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...

2 months ago

Solved


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

2 months ago

Solved


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

2 months ago

Solved


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

2 months ago

Solved


Count up then down
Create a function that produces counting up from 0 up to n then down to 0 n=2 --> 0 1 2 1 0 n=3 --> ...

2 months ago

Solved


Is it an Armstrong number?
An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. Fo...

2 months ago

Solved


Trimming Spaces
Given a string, remove all leading and trailing spaces (where space is defined as ASCII 32). Input a = ' singular value deco...

2 months ago

Solved


Create sequnce 1 4 9 16 25.........
Create sequnce 1 4 9 16 25......... upto entered input value using matlab scripting commands. Let y be output and x be input

2 months ago

Solved


Append two matrix as shown below example
Append two matrix as shown below example A=[1 2; 3 4] and B=[5 6;7 8] Answer must be 1 2 5 6 3...

2 months ago

Solved


Integer or Float?
Test an input to see whether it is an integer or a floating point number. If it is an integer return 1 for 'true'. Otherwise ret...

2 months ago

Solved


Factorial Numbers
Factorial is multiplication of integers. So factorial of 6 is 720 = 1 * 2 * 3 * 4* 5 *6 Thus 6 factorial = factorial(720)....

2 months ago

Solved


Mode
Find the mode of the vector Assumption: no vector is bimodal Example 1: input=[1 2 3 4 4]; output=4 Example 2: input=[7...

2 months ago

Solved


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

2 months ago

Solved


reverse string
input='rama' output='amar'

2 months ago

Load more