Community Profile

# Saksham Gupta

Last seen: 4 meses hace Con actividad desde 2022

CSE'23 at IIIT Surat

Programming Languages:
Python

All

Ver insignias

#### Content Feed

Ver por

Resuelto

Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...

7 meses hace

Resuelto

Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

7 meses hace

Resuelto

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

7 meses hace

Resuelto

Clean the List of Names
Given a list of names in a cell array, remove any duplications that result from different capitalizations of the same string. So...

7 meses hace

Resuelto

Making change
Given an amount of currency, return a vector of this form: [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01] Example: Input a = ...

7 meses hace

Resuelto

Which doors are open?
There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...

7 meses hace

Resuelto

Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

7 meses hace

Resuelto

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

7 meses hace

Resuelto

Remove all the consonants
Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

7 meses hace

Resuelto

Find the peak 3n+1 sequence value
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...

7 meses hace

Resuelto

Find the palindrome
Given the string a, find the longest palindromic sub-string b. So when a = 'xkayakyy'; you should return b = 'kayak';

7 meses hace

Resuelto

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

7 meses hace

Resuelto

Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

7 meses hace

Resuelto

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

7 meses hace

Resuelto

Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

7 meses hace

Resuelto

Remove the vowels
Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

7 meses hace

Resuelto

Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the numbers. Otherwise return false. Example...

7 meses hace

Resuelto

Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

7 meses hace

Resuelto

Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

7 meses hace

Resuelto

Find common elements in matrix rows
Given a matrix, find all elements that exist in every row. For example, given A = 1 2 3 5 9 2 5 9 3 2 5 9 ...

7 meses hace

Resuelto

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

7 meses hace

Resuelto

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

7 meses hace

Resuelto

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

7 meses hace

Resuelto

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

7 meses hace

Resuelto

Find max
Find the maximum value of a given vector or matrix.

7 meses hace

Resuelto

Global usage
This Challenge is to utilize Global variables. Global variables are risky as the subroutine may inadvertently and unwantingly...

7 meses hace

Resuelto

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

7 meses hace

Respondida
How to findout this equations value
As per my understanding, you wish to solve the given equations You may use the following code to solve them: syms R b eqns = ...

7 meses hace | 0

Respondida
Finding Maximum Consecutive Dry Days in Daily Rainfall Data
As per my understanding, you need assistance in writing code for your problem. This code should be helpful as per the condition...

7 meses hace | 0

Respondida
How do I perform a segmented regression for linear and exponential piecewise curve
As per my understanding , you wish to know how to perform segmented regression in MATLAB. You should try Curve Fitter App of MA...

7 meses hace | 0