Community Profile

# Elena De Angelis

42 2019 年以降の合計貢献数

#### Elena De Angelis's バッジ

We love vectorized solutions. Problem 1 : remove the row average.
Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solution will be tested for ac...

5ヶ月 前

Generate N equally spaced intervals between -L and L
Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. F...

5ヶ月 前

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

5ヶ月 前

Getting logical indexes
This is a basic MATLAB operation. It is for instructional purposes. --- Logical indexing works like this. thresh = 4...

5ヶ月 前

Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

5ヶ月 前

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

5ヶ月 前

Number of Even Elements in Fibonacci Sequence
Find how many even Fibonacci numbers are available in the first d numbers. Consider the following first 14 numbers 1 1 2...

5ヶ月 前

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

5ヶ月 前

Find number of days
The input is two date in string format (dd-mm-yyyy) find out the number of days between these two dates. Example: input: ...

5ヶ月 前

Is this matrix orthogonal?
Given a square matrix, a, determine whether it is orthogonal. INPUT: a, a n x n matrix OUTPUT: true or false

5ヶ月 前

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

5ヶ月 前

Fibonacci-Sum of Squares
Given the Fibonacci sequence defined by the following recursive relation, * F(n) = F(n-1) + F(n-2) * where F(1) = 1 and F(1)...

5ヶ月 前

06 - Matrix Equations 1
Define the vectors _aVec_ and _bVec_ and the matrix _aMat_: <<http://samle.dk/STTBDP/Assignment1_2a.png>> and <<http:/...

5ヶ月 前

Rounding
Round 10.67 and make 'y' equal to that number.

5ヶ月 前

Transpose
Write a MATLAB script in order to convert a random length row vector (v) into a column vector.

5ヶ月 前

First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero ...

5ヶ月 前

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

5ヶ月 前

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

5ヶ月 前

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

5ヶ月 前

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

5ヶ月 前

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

5ヶ月 前

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

5ヶ月 前

07 - Common functions and indexing 1
Define _cMat_: <<http://samle.dk/STTBDP/Assignment1_3c.png>> ( _cMat_ = 10x10 matrix where the numbers from 1 to 100 runs ...

5ヶ月 前

MATCH THE STRINGS (2 CHAR) very easy
Match the given string based on first two characters on each string. For example A='harsa'; b='harish'; result '1' ...

5ヶ月 前

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

5ヶ月 前

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

5ヶ月 前

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

5ヶ月 前

find the maximum element of the matrix
for e.g x = [1 2; 3 4] y = 4

5ヶ月 前

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

5ヶ月 前

Replace multiples of 5 with NaN
It is required to replace all values in a vector that are multiples of 5 with NaN. Example: input: x = [1 2 5 12 10 7] ...

5ヶ月 前