Solved


Linear Motion 7
A robot has a maximum rate of acceleration of a m/s2. If the robot starts from rest and reaches a velocity of v2 m/s. How far ha...

18 days ago

Solved


The Tower of Hanoi
In the <http://en.wikipedia.org/wiki/Tower_of_Hanoi Tower of Hanoi problem> with 3 rods (1, 2 & 3), the goal is to move a tower ...

18 days ago

Solved


Vector pop
Take |n| elements from the end of the vector |v| and return both the shorten vector |v| and the |n| elements in a separate vecto...

18 days ago

Solved


Vector push
Append an element |x| to the end of the vector |v| and return both the extended vector and the new number of its elements. |x| c...

18 days ago

Solved


Generate a random matrix A of (1,-1)
Input n: is an positive integer which serves as the dimension of the matrix A; Output: A=(Aij),where each entry Aij is either...

18 days ago

Solved


Product of Each Column
Given a matrix |mat| with |n| columns, return a row vector |v| of length |n|, where every element in |v| is the product of the |...

18 days ago

Solved


Find the average of a random sequance
Write a function that generates random integers within a loop, and calculates the mean of the positive numbers only. At each ...

18 days ago

Solved


I Plead the Fifth
Write a function to provide a yes or no answer to the input string. However, it must plead the 5th amendment (return an empty st...

18 days ago

Solved


5 Prime Numbers
Your function will be given lower and upper integer bounds. Your task is to return a vector containing the first five prime numb...

18 days ago

Solved


What is the distance from point P(x,y) to the line Ax + By + C = 0?
Given a point, P(x,y), find the distance from this point to a linear line. INPUTS: x, y, A, B, C OUTPUTS: d, the distance ...

18 days ago

Solved


Stuff the Board
You have a stack of tiles to put onto an array-like playing board. Each tile has a number (always an integer), and the board var...

18 days ago

Solved


Are all the three given point in the same line?
In this problem the input is the coordinate of the three points in a XY plane? P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) how can...

18 days ago

Solved


Selecting books on MATLAB for experts and beginners (blindfolded)
* Imagine you have been blindfolded and asked to pick up any two books randomly from the table. * There are n books suitable f...

18 days ago

Solved


Find Index of maximum Value and maximum Value of a vector
Find the Index of the first occurrence of the maximum value in a vector and also the maximum value in the vector. Example: [...

18 days ago

Solved


Generate a string like abbcccddddeeeee
This is the string version of Problem 1035. <http://www.mathworks.com/matlabcentral/cody/problems/1035-generate-a-vector-like-1-...

18 days ago

Solved


Number of odd and even elements within matrix
Input(m) - any matrix with integers Output(n) - n(1)=number of odd elements, n(2)=number of even elements Example: * m=...

18 days ago

Solved


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

18 days ago

Solved


Remove NaNs and numbers adjacent to NaNs
The aim is to remove the elements before and after NaN occurrences inside a vector. For example: x = [6 10 5 8 9 NaN 23 1...

18 days ago

Solved


Is this matrix orthogonal?
Given a square matrix, a, determine whether it is orthogonal. INPUT: a, a n x n matrix OUTPUT: true or false

18 days ago

Solved


Back to basics 1 - Saving
Covering some basic topics I haven't seen elsewhere on Cody. Given an input variable 'x', save it to disk in a file named 'co...

18 days ago

Solved


What number has this problem?
This problem is added because it is problem number *???* in the "Community" problems section. <http://www.mathworks.de/matlab...

18 days ago

Solved


Quadratic equation
given three inputs (a, b, c) for the equation a*x^2+b*x+c=0; return 1 if the roots are complex (non zero imaginary), and 0 if th...

18 days ago

Solved


Convert a vector of Integers into a matrix of binaries
Convert a vector of positive integers into a matrix containing their binary representation. Each column of the output contains t...

18 days ago

Solved


average for three points
how to calculate the average (for each three values of y) y=[2 3 5 3 4 2 3 4 5 3 2 7 8 6 5 5 4 3 3 3 2 ] you ...

18 days ago

Solved


Volume of Spherical Shell
In three-dimensional space, a spherical shell can be constructed from two concentric spheres. Determine the volume of a spheric...

18 days ago

Solved


Sum of self power series
The series, 1^1,2^2,3^3,4^4,.... Find the sum of such series when x terms are given.

18 days ago

Solved


Time and Variable mapping and matching
There is a 6X5 cell array where * 1st column represents time values * 2nd and 3rd column represent variables and their value...

18 days ago

Solved


Implement full adder circuit
Implement full adder circuit (Full Adder) Inputs signals are a, b and cin. Output signal y = [cout sum]

18 days ago

Solved


Determine value using Look-up table method
Given a set of 2 vectors x and y related in a certain way, you are supposed to find value of y (ydash) given a particular value ...

18 days ago

Solved


Mirror Image matrix across anti-diagonal
Given an input number x, create a mirror image matrix 'Y' across the anti-diagonal. For example, if x=3, Y = [1 2 3; ...

18 days ago

Load more