Community Profile

photo

Alyssa Sanchez


Last seen: 3 månader ago Active since 2022

Followers: 0   Following: 0

Statistics

  • Community Group Solver
  • Solver

View badges

Feeds

View by

Solved


generate number in particular way
A = [1 5 2 7]; MAX = 10; generate a array Y = [1 2 2 2 2 2 3 3 4 4]; i.e. total eleme...

ungefär ett år ago

Solved


Find longest run
Write a function longest_run that takes as input an array of 0's and 1's and outputs the length and index of the longest consecu...

ungefär ett år ago

Solved


S-T-R-E-T-C-H I-T O-U-T
You will be given a row of numbers (x), and a single number (n). Your job is to write a script that will stretch out the row of...

ungefär ett år ago

Solved


Zero Cross
Write a function that counts the number of times n a signal x changes sign. Examples x = [1 2 -3 -4 5 6 -7 8 -9 10 11] ...

ungefär ett år ago

Solved


"Low : High - Low : High - Turn around " -- Create a subindices vector
Let two vectors *lo* and *hi* be given. The job is to create a index vector like so idx = [lo(1):hi(1) lo(2):hi(2) ...]...

ungefär ett år ago

Solved


Specific Element Count
Given a vector _v_ and a element _e_, return the number of occurrences of _e_ in _v_. Note: NaNs are equal and there may be n...

ungefär ett år ago

Solved


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

ungefär ett år ago

Solved


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

ungefär ett år ago

Solved


middleAsColumn: Return all but first and last element as a column vector
Given input A, return all but the first and last elements, arranged as a column vector. (I.e., all dimensions after the first s...

ungefär ett år ago

Solved


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

ungefär ett år ago

Solved


Reindex a vector
You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

ungefär ett år ago

Solved


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

ungefär ett år ago

Solved


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

ungefär ett år ago

Solved


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

ungefär ett år ago

Solved


Remove the two elements next to NaN value
The aim is to *remove the two elements next to NaN values* inside a vector. For example: x = [6 10 5 8 9 NaN 23 9 7 3 21 ...

ungefär ett år 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,...

ungefär ett år ago

Solved


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 same order a...

ungefär ett år ago

Solved


Largest territory
Determine whose territory is largest. If there are multiple numbers tied for the largest territory, return the smallest number. ...

ungefär ett år ago

Solved


Time Expansion
How can you slow down any discrete-time signal? Example Input original signal x. x = [1 2 3 -1 -2 -5 -4] We want t...

ungefär ett år ago

Solved


compress sequence into intervals
You're given a row vector of monotonically increasing integers most of which are consecutive. Find the upper and lower bounds of...

ungefär ett år ago

Solved


Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

ungefär ett år ago

Solved


expand intervals vol.2
Similar to problem <http://www.mathworks.co.uk/matlabcentral/cody/problems/2528 2528>. This is a more general case, when bounds ...

ungefär ett år ago

Solved


expand intervals
You're given a row vector of an even number of monotonically increasing integers. Each pair of consecutive integers is the lower...

ungefär ett år ago

Solved


Another colon problem
This is simple problem based on problems 555, 801, 1118, etc. Create an index vector from two input vectors. Example: ...

ungefär ett år ago

Solved


Find the index of n in magic(n)
If input n=5, then magic(n) is 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22...

ungefär ett år ago

Solved


counting groups!
This problem is about counting groups. Example If you have x: x = [0.8 0.8 0.8 0.3 0.3 0.4 0.5 0.6 0.6 0.9] then a...

ungefär ett år ago

Solved


Max Change in Consecutive Elements
If an array is given as input then find the index of consecutive elements that represent maximum change. Example: Input ...

ungefär ett år ago

Solved


Replace pattern 0 1 0 and 1 0 1
Find and replace a pattern in a row of zeroes and ones. * Find 1 0 1 and replace it with 1 1 1 * Find 0 1 0 and replace it w...

ungefär ett år ago

Solved


Weave two matrices together to form one matrix
Take the first column from matrix a, then insert the first column from matrix b, and so on. For example: a = [1 2 3 4]; b ...

ungefär ett år ago

Solved


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.

ungefär ett år ago

Load more