Solved


Matlab Basics II - Determine if an array has a 3rd dimension
For an array A, determine whether it has 3 dimensions, return 0 if x is only 2D, and 1 if x is 3D

8 years ago

Solved


Upper Matrix Mock
Given a vector v=[1 3 6 9 11], turn it into a matrix 'ramp' like so: m=[1 3 6 9 11; 0 1 3 6 9; 0 0 1 3 6; 0 0 0 1...

8 years ago

Solved


generate number in particular way
A = [1 5 2 7]; MAX = 10; generate a array Y = [1 2 2 2 2 2 3 3 4 4]; i.e. total eleme...

8 years ago

Solved


Number of occurrences of letter in a text
Given an input text either as a string or as a cell array of strings, return a (1 x 26) matrix containing the number of occurren...

8 years ago

Solved


Don't Try, give up and return NaN.
This is another version of <http://www.mathworks.com/matlabcentral/cody/problems/3107-try-and-catch-simple-example problem 3107....

8 years ago

Solved


Find scalar product of two polynomials a and b, given as vector array.
Find scalar product of two polynomials given as vector array. Example a=[1 -1 2]; b=[2 4 1]; result=0

8 years ago

Solved


Find the next square number
Given one or more integers n, find the next integer that is a square, for each of them. Example 1: n = 1; out = 4; ...

8 years ago

Solved


Chicken Race
2 chickens, Pete and Fred, compete in a 100 meter race. Pete runs at a velocity of vp meter/second and Fred is slower, running ...

8 years ago

Solved


Matrix Ax=B problem
Take a incoming A and B vector, and solve for x

8 years ago

Solved


Add the even numbers
Add only the even numbers of x example: x = [1 2 3 4 5] the positive numbers are: 2 4, so their sum is 6

8 years ago

Solved


intervals
Write a function that takes an interval from a to b, and divides it into 6 parts.

8 years ago

Solved


prime to each other
Given two integers n1, n2 greater than 1, find out if they have common divisors or are prime to each other. Return "true" if the...

8 years ago

Solved


COUNT LETTERS
Count the number of letters in a given string. For Example: STR='The MAtlAb code'; output:T 2 H 1 E 2 M 1 A 2 L 1 B 1 C ...

8 years ago

Solved


Get derivarive of polynomial given as vector array.
Get derivarive of polynomial given as vector array. Example p=[ 1 2 0 5 0 3 ]; result=[ 5 8 0 10 ...

8 years ago

Solved


Find my daddy long leg (No 's')
Given the ratio of the two legs (longer / shorter), and the hypotenuse length, find the value of the bigger leg.

8 years ago

Solved


MPS to MPH
Given the speed in miles per second, find the speed in miles per hour.

8 years ago

Solved


Make an identity matrix whose diagonal elements are 1:n
For a given input n, make an n by n identity matrix that contains the elements 1:n along its diagonal. For example, if input=5: ...

8 years ago

Solved


Find max prime number
Given integer number n. Find the max prime number (mpn) that smaller than or equal to n. Example: n = 10 --> mpn = 7

8 years ago

Solved


Determine whether the number is multiple of 3 or not
Let a=6 and as 6 = 2*3 which means 6 is multiple of 3; return true if a is multiple of 3,otherwise false.

8 years ago

Solved


Set x value to each odd index of vector y.
Set x value to each odd index of vector y.

8 years ago

Solved


Find the distance traveled by a car given velocity and time.
A car is traveling at a constant velocity for a specific amount of time. The function should use the two inputs, velocity and ti...

8 years ago

Solved


Average of odd values
Find the average of odd values in given a matrix. e.g x=[ 4 11 8 ; 9 2 7 ] y =( 11 + 9+ 7 ) / 3

8 years ago

Solved


Even or Odd
Write a function which can tell us if the given value x is odd or even. So if x is even return true and if x is odd return false...

8 years ago

Solved


Replace Nan!
Replace Nan in the given vector(v) with 9999.

8 years ago

Solved


Zero Cross
Write a function that counts the number of times n a signal x crosses zero or changes sign. Examples x = [1 2 -3 -4 5 6 ...

8 years ago

Solved


Find the outcast
All pairs have the same difference except for one. Output the index of the latter Example: input =[0 1; 1 0; ...

8 years ago

Solved


Check availability of a number in an array
An array is given A=[1 2 3 4 5 7 8 9 10]. Find whether the number n is present in given array or not. If the number n is prese...

8 years ago

Solved


wipe out!
make all the elements in given x zero.

8 years ago

Solved


Slope of the line passing through two points
Determine the slope of a line passing through the points a=[x1 y1] and b=[x2 y2].

8 years ago

Solved


Set x value to each even index of vector y.
Set x value to each even index of vector y.

8 years ago

Load more