A résolu


Combine the first and last names
MATLAB R2016 provides a rich set of functions to work with string arrays. In this problem, you will be given two string arrays o...

environ 6 ans il y a

A résolu


Perimeter
Given a sequence of points forming a closed path (first and last points are coincident) return the perimeter value. For example...

environ 6 ans il y a

A résolu


Signed Magnitude
For a given input vector, return the value that is furthest from zero. For example, if x = [1 2 -12] return -12.

environ 6 ans il y a

A résolu


Matrix multiplication across rows
Given matrix m, return matrix n such that, rows of n are result of multiplication of the rows of the input matrix Example ...

environ 6 ans il y a

A résolu


Basic commands - rounding
make a function which will round to integer, which is nearer to zero. Example x=[-2.5 2]; y=[-2 2];

environ 6 ans il y a

A résolu


Some Assembly Required
The input to this function is a matrix of real numbers. Your job is to assemble the rows of the matrix into one large row that ...

environ 6 ans il y a

A résolu


Removing rows from a matrix is easy - but what about inserting rows?
Assume A is a 5-by-5 matrix. A([2,4],:) = [] is a quick way to remove rows 2 and 4. Can you find a quick way to insert rows into...

environ 6 ans il y a

A résolu


Operate on matrices of unequal, yet similar, size
You may want to add a vector to a matrix, implying that the vector is added to each column of the matrix. Or multiply a 3x4x5 ma...

environ 6 ans il y a

A résolu


N-Dimensional Array Slice
Given an N-dimensional array, _A_, an index, _I_, and a dimension, _d_, return the _I_ th elements of _A_ in the _d_ dimension. ...

environ 6 ans il y a

A résolu


Acid and water
⚖ ⚖ ⚖ ⚖ ⚖ ⚖ ⚖ ⚖ Assume that there is a 100 liter tank. It is initially fi...

environ 6 ans il y a

A résolu


Create an n-by-n null matrix and fill with ones certain positions
The positions will be indicated by a z-by-2 matrix. Each row in this z-by-2 matrix will have the row and column in which a 1 has...

environ 6 ans il y a

A résolu


Symmetric matrix
You must create a n-by-n *symmetric* matrix such that A(row,col) = row/col for col >= row. Example if n =3 : output is : ...

environ 6 ans il y a

A résolu


An asteroid and a spacecraft
&#128640 Imagine a non-relativistic simple situation. Assume positions p0, p1, p2, and p3 are three dimensional Cartesian ...

environ 6 ans il y a

A résolu


Divisible by 5
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

environ 6 ans il y a

A résolu


Horizontal matrix sort
Given a matrix x with n rows and m columns, return a matrix y with n rows and 2m columns, such that every row in x is sorted fro...

environ 6 ans il y a

A résolu


How many days in a month?
Return the number of days in a given month in 2017. If the input is not a valid month number, return -1. Examples: Input...

environ 6 ans il y a

A résolu


5th Time's a Charm
Write a function that will return the input value. However, your function must fail the first four times, only functioning prope...

environ 6 ans il y a

A résolu


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

environ 6 ans il y a

A résolu


Make your own Test Suite (part 3)
In this task you need to imagine that you — _yes, YOU_ — have developed a problem on Cody for _me_ to solve, and now *you need t...

environ 6 ans il y a

A résolu


Make your own Test Suite (part 1)
In this task you need to imagine that you — _yes, YOU_ — have developed a problem on Cody for _me_ to solve, and now *you need t...

environ 6 ans il y a

A résolu


Make your own Test Suite (part 2)
In this task you need to imagine that you — _yes, YOU_ — have developed a problem on Cody for _me_ to solve, and now *you need t...

environ 6 ans il y a

A résolu


Vertical matrix sort
Given a matrix x with n rows and m columns, return a matrix y with 2n rows and m columns, such that every column in x is sorted ...

environ 6 ans il y a

A résolu


Write a function man that takes a row vector v and returns a matrix H as follows..
Write a function called man that takes a row vector v as an input and returns a matrix H whose first column consist of the eleme...

environ 6 ans il y a

A résolu


Find the area of a rectangle if length of the diagonal is given.
if length of a diagnonal in rectangle is 5. Its area is 12.

environ 6 ans il y a

A résolu


Breaking Out of the Matrix
Do you want to take the Red Pill, or the Blue Pill? If you take the Blue Pill, you will simply pass along to the next problem...

environ 6 ans il y a

A résolu


ASCII Birthday Cake
Given an age and a name, give draw an ASCII birthday cake. For example, given the name "CODY" and the age 5, return a string wit...

environ 6 ans il y a

A résolu


Sums of Multiple Pairs of Triangular Numbers
This is a follow-up to <https://www.mathworks.com/matlabcentral/cody/problems/44289 Problem 44289> - Find two triangular numbers...

environ 6 ans il y a

A résolu


Pi Digit Probability
Assume that the next digit of pi constant is determined by the historical digit distribution. What is the probability of next di...

environ 6 ans il y a

A résolu


Basic commands - amount of inputs
Make a function, which will return amount of given inputs Example: amountinput(1,2,4,3,10) -> 5 , because we gave functio...

environ 6 ans il y a

A résolu


Matlab Basics II - Extract last 3 elements of a vector
Let x be a vector of unknown length, we are always interested in the last 3 numbers in the vector, write a function that gives t...

environ 6 ans il y a

Charger plus