Community Profile

# dipanka tanu sarmah

2017 이후 활성

All

배지보기

#### Content Feed

보기 기준

해결됨

Return unique values without sorting
If the input vector A is [42 1 1], the output value B must be the unique values [42 1] The *values of B are in the s...

약 4년 전

답변 있음
Count number of specific values in matrix
along with this if you want to count the number of NaN ,(if there any) use nnz(isnan(m))

약 4년 전 | 1

해결됨

Return elements unique to either input
Given two numeric inputs a and b, return a row vector that contains the numbers found in only a or only b, but not both. For ex...

약 4년 전

해결됨

Replicate elements in vectors
Replicate each element of a row vector (with NaN) a constant number of times. Examples n=2, A=[1 2 3] -> [1 1 2 2 3 3] ...

약 4년 전

해결됨

Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

약 4년 전

해결됨

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

약 4년 전

해결됨

Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

약 4년 전

해결됨

Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....

약 4년 전

해결됨

Cell Counting: How Many Draws?
You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...

약 4년 전

해결됨

Reverse the Words (not letters) of a String
*Description* Change the words of a string such that the words appear in reverse order. You may assume that the string is a n...

약 4년 전

해결됨

Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

약 4년 전

해결됨

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

약 4년 전

해결됨

Scoring for oriented dominoes
Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...

약 4년 전

해결됨

Implement simple rotation cypher
If given a letter from the set: [abc...xyz] and a shift, implement a shift cypher. Example: 'abc' with a shi...

약 4년 전

해결됨

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]

약 4년 전

답변 있음
Is there a way to obtain desired index without using 'find'?
you can use the following function : function posX = findPosition(x,y) posX=[]; for i =1:length(x) p=x-y; ...

약 4년 전 | 0

해결됨

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

약 4년 전

해결됨

The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

약 4년 전

해결됨

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

약 4년 전

해결됨

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

약 4년 전

해결됨

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

약 4년 전

답변 있음
find repeating numbers
function y = repeated(x) for i=1:length(x) if length(find(x==i)) >=2 y{i,1}=x(i); y{i,2}=length(find(x==i)) ...

약 4년 전 | 0

해결됨

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

약 4년 전

해결됨

Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

약 4년 전

해결됨

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

약 4년 전

해결됨

Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

약 4년 전

해결됨

Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

약 4년 전

해결됨

Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

약 4년 전

해결됨

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

약 4년 전

해결됨

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

약 4년 전