Community Profile

photo

Anand Abhishek Singh


IIT Kanpur

23 total contributions since 2011

Contact

Anand Abhishek Singh's Badges

  • Commenter
  • Promoter
  • Solver

View details...

Contributions in
View by

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

fast 6 Jahre ago

Solved


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

fast 6 Jahre 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,...

fast 6 Jahre ago

Solved


Return the first and last character of a string
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

fast 6 Jahre ago

Solved


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

fast 6 Jahre 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]

fast 6 Jahre ago

Solved


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

fast 6 Jahre ago

Solved


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

fast 6 Jahre ago

Solved


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

fast 6 Jahre ago

Solved


inner product of two vectors
inner product of two vectors

fast 6 Jahre ago

Solved


Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

fast 6 Jahre ago

Solved


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

fast 6 Jahre ago

Solved


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

fast 6 Jahre ago

Solved


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

fast 6 Jahre ago

Solved


Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

fast 6 Jahre ago

Solved


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

fast 6 Jahre ago

Solved


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

fast 6 Jahre ago

Solved


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

fast 6 Jahre ago

Solved


Add two numbers
Given a and b, return the sum a+b in c.

fast 6 Jahre ago

Solved


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

fast 6 Jahre ago

Submitted


Draw a circle on given image with radius
Circle on a image

mehr als 6 Jahre ago | 0 downloads |

Question


image capture
1. f=videoinput('winvideo',1); >> frame = getsnapshot(f); >> imshow(frame); this code capture image from webcam.the on t...

mehr als 8 Jahre ago | 1 answer | 0

1

answer

Question


control mouse clicking
how could we control mouse clicking operation using matlab in xp ?

mehr als 8 Jahre ago | 2 answers | 0

2

answers