A résolu


Make a 1 hot vector
Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...

7 mois il y a

A résolu


Put Two 1D matrices into one 1D matrix
Example: If input a = [1 2 3 4 5]; input b = [10 9 8 7 6]; then output will be, y_correct = [1 10 2 9 3 8 4 7 5...

7 mois il y a

A résolu


Compare two input matrices
Check which input matrix has more elements. Return "1" if matrix A has more elements than matrix B. Otherwise return "0". Exa...

7 mois il y a

A résolu


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

7 mois il y a

A résolu


Find the outlier in a set of samples
Given an array x of numbers. Assumed that this array has one outlier. Find the position p and the value v of the outlier in this...

7 mois il y a

A résolu


A Simple Tide Gauge with MATLAB
*&#8767 &#8767 &#8767 &#8767 &#8767 &#8767 &#8767 &#8767* You are standing in a few inches of sea water on a beach. You a...

7 mois il y a

A résolu


Number of Circles in a Number
Given a number, return the number of closed 'circles' in the base 10 numerical representation. Note: the number 4 has no circ...

7 mois il y a

A résolu


Dominant Matrix - 01
A matrix is said to be diagonally dominant if for every row of the matrix, the magnitude of the diagonal entry in a row is large...

7 mois il y a

A résolu


All capital?
Are all the letters in the input string capital letters? Examples: 'MNOP' -> 1 'MN0P' -> 0

7 mois il y a

A résolu


construct matrix with identical rows
Input a row vector such as x=1:10. Now we need to construct a matrix with L rows,of which every row vector is a copy of x. E...

7 mois il y a

A résolu


Related Vectors
I have two vectors A & B. If the values in vector A is zero then the corresponding value in vector B should be zero. Example:...

7 mois il y a

A résolu


Find the remainder - 02
Given an array of integers, find the remainder when the summation of all the elements is divided by N

7 mois il y a

A résolu


Last Duplicate
Given an array of integers, find the last duplicate element — that is, the element whose second occurrence appears latest in the...

7 mois il y a

A résolu


Create a Standard Size Vector
Given an input x, create a row vector y from 1 to x with 5 elements.

7 mois il y a

A résolu


Resizing Matrices
Take an 4x3 matrix, and resize it to a 2x6 matrix

7 mois il y a

A résolu


Finding an element in a vector
x is a vector of unknown length your function should return the index of the first element in the vector that is greater than...

7 mois il y a

A résolu


Draw a '9' in a zero matrix!

7 mois il y a

A résolu


Draw a '6' in a zero matrix!

7 mois il y a

A résolu


Draw a '7' in a zero matrix!

7 mois il y a

A résolu


Draw a '8' in a zero matrix!

7 mois il y a

A résolu


Draw a '5' in a zero matrix!

7 mois il y a

A résolu


Draw a '4' in a zero matrix!

7 mois il y a

A résolu


Draw a '3' in a zero matrix!

7 mois il y a

A résolu


Draw a '2' in a zero matrix!

7 mois il y a

A résolu


Draw a '1' in a zero matrix!

7 mois il y a

A résolu


Sum of Positive Elements in a Matrix
Given a matrix A, write a function that returns the sum of all positive elements in A. Input: A = [-3, 4, -1; 6, -2, 8] ...

7 mois il y a

A résolu


Sum of Even Numbers in a Vector
Write a function that takes a vector x as input and returns the sum of all even numbers in x. Input: x = [1, 2, 3, 4, 5, 6] ...

7 mois il y a

A résolu


0, 2, 0, -2, 0, 2, 0, -2, ...
Generate the first n terms of a periodic sequence defined as f(x) = 0, 2, 0, -2, 0, 2, 0, -2, ..., for x = 1, 2, 3, 4, 5, 6...

7 mois il y a

A résolu


Reverse a string
Reverse the given string. Example input = 'reverse' output = 'esrever'

7 mois il y a

A résolu


Find the largest number
Find the largest number |x| among 4 numbers given as variables |a|, |b|, |c|, and |d|. Example: Input: a = 4; b = 7; c ...

7 mois il y a

Charger plus