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


Matlab Basics II - Minimum
Write a function that returns the minimum of each ROW of a matrix x example: x = [1 2 3; 4 5 6]; output [1;4];

4 years ago

Solved


Matlab Basics - Convert a row vector to a column vector
Write a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any...

4 years ago

Solved


Add two numbers
Add two numbers (For beginners)

4 years ago

Solved


Great Circle Distance
Find shortest between two points on a ball given their azimuthal and polar angles (in degrees) as well as the radius of the sphe...

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

4 years ago

Solved


Angle between Two Vectors
The dot product relationship, a dot b = | a | | b | cos(theta), can be used to determine the acute angle between vector a and ve...

4 years ago

Solved


Spherical radius given four points
Determine the radius of a sphere provided four non-coplanar points on the surface of the sphere. pts = [x1 y1 z1; x...

4 years ago

Solved


Volume of a Parallelepiped
Calculate the volume of a Parallelepiped given the vectors for three edges that meet at one vertex. A cube is a special case ...

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

4 years ago

Solved


Find third Side of a right triangle given hypotenuse and a side. No * - or other functions allowed
Find the remaining side of a triangle given the hypotenuse and a side. However, the normal functions and symbols are not allowe...

4 years ago

Solved


Television Screen Dimensions
Given a width to height ratio of a TV screen given as _w_ and _h_ as well as the diagonal length of the television _l_, return t...

4 years ago

Problem


Function minimization - global minimum
Sequel of problem 45951 <https://www.mathworks.com/matlabcentral/cody/problems/45951> Can you do even better, within the r...

4 years ago | 1 | 4 solvers

Solved


Change the first and last diagonal element of the identity matrix to zero
Starting with the identity matrix, change first and last diagonal element to zero. Example If n=5 A = 0 0 ...

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

4 years ago

Solved


Positive Infinity
Round the array a towards positive infinity

4 years ago

Solved


Cumulative difference
Given an array, return the cumulative difference. Example a = [ 1 3 5 7 ] cumdiff = [ 1 2 1 -2 ]

4 years ago

Solved


Find and replaces spaces from a input string with *
For a given input string str, find how many spaces are there in the string and replace those spaces with * e.g. str = 'this is ...

4 years ago

Solved


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

4 years ago

Solved


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

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


Negative matrix
Change the sign of all elements in given matrix.

4 years ago

Solved


Create incrementing array
Given a and b generate an output matrix as shown in following examples: a=2 b=5 output=[2 20 200 2000 20000] a=4 b...

4 years ago

Solved


Calculate distance travelled when given radius and rotations
When given radius of wheel and number of rotations calculate total distance travelled consider pi=3.14

4 years ago

Solved


Convert Fahrenheit to Celsius
Calculate the Celsius temperature C given the Fahrenheit temperature F. Examples: Input F = 90 Output C is 32.22 I...

4 years ago

Solved


newRMS
find root mean square of a signal x in less time than the test code and accurate to six places.

4 years ago

Solved


Space Saver
Remove all characters that are below a space in ASCII value.

4 years ago

Solved


Nilpotent matrix
Check if matrix A is <http://mathworks.com/ nilpotent>.

4 years ago

Solved


Sum of series VII
What is the sum of the following sequence: Σ(km^k)/(k+m)! for k=1...n for different n and m?

4 years ago

Solved


Sum of series VI
What is the sum of the following sequence: Σk⋅k! for k=1...n for different n?

4 years ago

Load more