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

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

4 years ago

Solved


Positive Infinity
Round the array a towards positive infinity

4 years ago

Solved


Persistent Usage
This Challenge is to implement the Matlab Persistent variable capability. Given a sequence of Calls to a function return the cu...

4 years ago

Solved


Strange Number Algorithms
Three integer numbers will be provided to you. Write a function to Step1: Multiply first number by 3. Step2: Add 6 with t...

4 years ago

Solved


Squares inside a square!

4 years ago

Solved


Number of paths on a grid
Consider a grid formed by n vertices vertically down, and m vertices horizontally right. Your starting point is at the top lef...

4 years ago

Solved


Index of a Rational number
The set of real numbers are infinite. They are so many that real numbers can't even be enumerated. However, unlike real numbers ...

4 years ago

Solved


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

4 years ago

Solved


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

4 years ago

Solved


Flipping
Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...

4 years ago

Solved


Replacing a row
For matrix G=[1 2 3; 4 5 6; 7 8 9] Replace the 2nd row with 8s **remember to create matrix G

4 years ago

Solved


ASCii Code
Using matlab, give the symbol that is associated with ASCii code 122

4 years ago

Solved


Find the sum of n squares
What is the sum of the squares of the first n integers?

4 years ago

Solved


modulus of a number
find the modulus of a given number

4 years ago

Solved


Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

4 years ago

Solved


Create an m x n array consisting only of an input value.
Create an array with m rows and n columns wherein all entries are assigned the input value x.

4 years ago

Solved


Find Elements in Range
Based on a question on <http://www.mathworks.com/matlabcentral/answers/ MATLAB Answers>. Find all the elements of a vector wh...

4 years ago

Solved


Sum My Indices
Given inputs M and N (in that order), output an MxN matrix whose entries are equal to the sum of their indices. Example input...

4 years ago

Problem


Find the particular dividend
It is known that once you write the sequence 10101...101 long enough, the number will be finally divisible by any odd number if ...

4 years ago | 2 | 12 solvers

Solved


Matlab Basics - Create a row vector
Write a Matlab script to create a row vector of 10 consecutive numbers x = [1 2 3 4 5 6 7 8 9 10]

4 years ago

Solved


Matlab Basics - Set unwanted parts of a vector to zero
Consider a vector x, of length >= 7, write a script to set elements 2, 5, and 6 to zero. Example x = [1 2 3 4 5 6 7] --> ...

4 years ago

Solved


Guess the logic

4 years ago

Solved


Replace multiples of 5 with NaN
It is required to replace all values in a vector that are multiples of 5 with NaN. Example: input: x = [1 2 5 12 10 7] ...

4 years ago

Solved


Find indices of diagonal elements
Given a matrix A and a diagonal index d (where 0 indicates the main diagonal and off-diagonals are identified by positive and n...

4 years ago

Solved


Simple sum 1

4 years ago

Solved


Summation of array
Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

4 years ago

Solved


Volume and area of a sphere
Input(r) - radius Output([v,s]) - volume and area

4 years ago

Solved


Find the dimensions of a matrix
Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

4 years ago

Load more