Community Profile

# James Batzorigt

##### Last seen: 19 Tage ago
58 total contributions since 2020

View details...

Contributions in
View by

Solved

Read a column of numbers and interpolate missing data
Given an input cell array of strings s, pick out the second column and turn it into a row vector of data. Missing data will be i...

19 Tage ago

Solved

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

19 Tage ago

Solved

Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

19 Tage ago

Solved

Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

19 Tage ago

Solved

Remove all the words that end with "ain"
Given the string s1, return the string s2 with the target characters removed. For example, given s1 = 'the main event' your ...

19 Tage ago

Solved

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

19 Tage ago

Solved

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

19 Tage ago

Solved

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

19 Tage ago

Solved

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

19 Tage ago

Solved

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

19 Tage ago

Solved

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

19 Tage ago

Solved

Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

19 Tage ago

Solved

Select every other element of a vector (★★)
(copy of prob 6) Write a function which returns every other element of the vector passed in. That is, it returns the all odd-...

19 Tage ago

Solved

Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

19 Tage ago

Solved

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

19 Tage ago

Solved

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

19 Tage ago

Solved

Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

19 Tage ago

Solved

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

etwa ein Monat ago

Solved

Create a vector
Create a vector from 0 to n by intervals of 2.

etwa ein Monat ago

Solved

Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

etwa ein Monat ago

Solved

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

etwa ein Monat ago

Solved

Inner product of two vectors
Find the inner product of two vectors.

etwa ein Monat ago

Solved

Get the length of a given vector
Given a vector x, the output y should equal the length of x.

etwa ein Monat ago

Solved

Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

etwa ein Monat ago

Solved

Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...

etwa ein Monat ago

Solved

Dimensions of a rectangle
The longer side of a rectangle is three times the length of the shorter side. If the length of the diagonal is x, find the width...

etwa ein Monat ago

Solved

Find a Pythagorean triple
Given four different positive numbers, a, b, c and d, provided in increasing order: a < b < c < d, find if any three of them com...

etwa ein Monat ago

Solved

Is this triangle right-angled?
Given any three positive numbers a, b, c, return true if the triangle with sides a, b and c is right-angled. Otherwise, return f...

etwa ein Monat ago

Solved

Area of an Isoceles Triangle
An isosceles triangle has equal sides of length x and a base of length y. Find the area, A, of the triangle. <<https://imgur...

etwa ein Monat ago

Solved

Triangle sequence
A sequence of triangles is constructed in the following way: 1) the first triangle is Pythagoras' 3-4-5 triangle 2) the s...

etwa ein Monat ago