Community Profile

# Srinidhi

### State University of New York at Buffalo (University at Buffalo)

78 2021 年以降の合計貢献数

Chemical Engineering

#### Srinidhi's バッジ

How many Fibonacci numbers?
Find the number of unique Fibonacci numbers (don't count repeats) in a vector of positive integers. Example: x = [1 2 3 4...

3日 前

Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

3日 前

Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

5日 前

Determine the mean of matrix
Determine the mean of matrix without using mean function Hint: use simple algorithm

7日 前

Reverse a matrix
Its simple. You have to reverse a given matrix.

7日 前

Find the dimensions of a matrix
Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

7日 前

Matlab Basics - Convert a row vector to a column vector
Write a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any...

7日 前

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

7日 前

given 3 sides, find area of this triangle
1:3 -> 0; 3:5 -> 6

11日 前

Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

12日 前

Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

12日 前

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

12日 前

You just measured its surface area, that is the input.

12日 前

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

12日 前

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

12日 前

Who knows the last digit of pi?
There is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can ...

12日 前

Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

12日 前

Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

12日 前

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]

12日 前

Is my wife right?
Regardless of input, output the string 'yes'.

12日 前

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

13日 前

Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

13日 前

Find out missing number from a vector of 9 elements
You are given a vector of size 9, x = [x1 x2 x3 x4 x5 x6 x7 x8 x9] Elements of x may be randomly selected without repeati...

13日 前

Derivative of polynomial
Compute the derivative of a given polynomial. The input is an <http://www.mathworks.com/help/matlab/math/representing-polynomial...

13日 前

convert matrix to single column
given any matrix, convert it to single column

13日 前

Find Missing Number
A little problem (inspired by CodeChef) for the coffee break. A friend give you an array of size n-1 integers and these int...

13日 前

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

14日 前

Return area of square
Side of square=input=a Area=output=b

14日 前

Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

14日 前

Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

14日 前