..

Solved

Find last zero for each column

Given a numeric array of arbitrary size, return the row index of the last zero for each column. If a column contains all nonzero...

environ 2 mois ago

Solved

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 2 mois ago

Solved

Symmetry of vector

Determine whether the vector is symmetric or not (vector could be even or odd in length). For example: x = [1 2 3 3 2 1] ...

environ 2 mois ago

Solved

Draw 'J'

Given n as input, generate a n-by-n matrix 'J' using 0 and 1 . Example: n=5 ans= [0 0 0 0 1 0 0 0 0 1 0 0 ...

environ 2 mois ago

Solved

Draw 'I'

Given n as input, draw a n-by-n matrix 'I' using 0 and 1. example: n=3 ans= [0 1 0 0 1 0 0 1 0] n=...

environ 2 mois ago

Solved

Draw 'H'

Draw a x-by-x matrix 'H' using 1 and 0. (x is odd and bigger than 2) Example: x=5 ans= [1 0 0 0 1 1 0 0 0 1 ...

environ 2 mois ago

Solved

Draw a 'N'!

Given n as input, generate a n-by-n matrix 'N' using 0 and 1 . Example: n=5 ans= [1 0 0 0 1 1 1 0 0 1 1 0 ...

environ 2 mois ago

Solved

Bit calculation

Give me the count of numbers from 1 to n having their last two bits as 0. For example function y = ret_count(4) y = x...

2 mois ago

Solved

Draw a 'Z'.

Given _n_ as input, generate a n-by-n matrix like 'Z' by _0_ and _1_ . Example: n=5 ans= [1 1 1 1 1 0 0 0 1 ...

3 mois ago

Solved

Draw 'O' !

Given n as input, generate a n-by-n matrix 'O' using 0 and 1 . example: n=4 ans= [1 1 1 1 1 0 0 1 ...

3 mois ago

Solved

Draw a 'X'!

Given n as input Draw a 'X' in a n-by-n matrix. example: n=3 y=[1 0 1 0 1 0 1 0 1] n=4 y=[1 0 0...

3 mois ago

Solved

Draw 'F'

Draw a x-by-x matrix 'F' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 1 1 0 0 0 0 ...

3 mois ago

Solved

Draw 'E'

Draw a x-by-x matrix 'E' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 1 1 0 0 0 0 ...

3 mois ago

Solved

Draw 'D'.

Draw a x-by-x matrix 'D' using 0 and 1. example: x=4 ans= [1 1 1 0 1 0 0 1 1 0 0 1 1 1 1 0]

3 mois ago

Solved

Draw 'C'.

Given x as input, generate a x-by-x matrix 'C' using 0 and 1. example: x=4 ans= [0 1 1 1 1 0 0 0 ...

3 mois ago

Solved

Draw 'B'

Draw a x-by-x matrix 'B' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 0 1 0 0 0 1 ...

3 mois ago

Solved

Reverse Calculator

Use this reverse calculator and give correct output Its simple, In my Reverse calculator if you press 0 it will be considered...

3 mois ago

Solved

Rescale Scores

Each column (except last) of matrix |X| contains students' scores in a course assignment or a test. The last column has a weight...

7 mois ago

Solved

Crop an Image

A grayscale image is represented as a matrix in MATLAB. Each matrix element represents a pixel in the image. An element value re...

7 mois ago

Solved

Calculate Inner Product

Given two input matrices, |x| and |y|, check if their inner dimensions match. * If they match, create an output variable |z|...

7 mois ago

Solved

Find the Best Hotels

Given three input variables: * |hotels| - a list of hotel names * |ratings| - their ratings in a city * |cutoff| - the rat...

10 mois ago

Solved

Verify Law of Large Numbers

If a large number of fair N-sided dice are rolled, the average of the simulated rolls is likely to be close to the mean of 1,2,....

11 mois ago

Solved

Solve a System of Linear Equations

*Example*: If a system of of linear equations in _x₁_ and _x₂_ is: 2 _x₁_ + _x₂_ = 2 _xS...

12 mois ago

Solved

Find the Oldest Person in a Room

Given two input vectors: * |name| - user last names * |age| - corresponding age of the person Return the name of the ol...

12 mois ago

Solved

Convert from Fahrenheit to Celsius

Given an input vector |F| containing temperature values in Fahrenheit, return an output vector |C| that contains the values in C...

12 mois ago

Solved

Calculate Amount of Cake Frosting

Given two input variables |r| and |h|, which stand for the radius and height of a cake, calculate the surface area of the cake y...

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

12 mois ago

Solved

Getting the indices from a matrice

Getting the indices from a matrice. Inspired by Problem 645. Getting the indices from a vector by the great Doug Hull. Given a...

environ un an 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) ...]...

environ un an ago

Solved

Piecewise linear interpolation

Given an Mx2 vector and a row of M-1 integers, output a two column vector that linearly interpolates Y times between each succes...

environ un an ago