Solved

Return the first and last characters of a character array

Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

1 year ago

Solved

Create times-tables

At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

1 year ago

Solved

surface of a spherical planet

you just discovered its circumference, that is the input.

1 year ago

Solved

radius of a spherical planet

You just measured its surface area, that is the input.

1 year ago

Solved

Create sequnce 1 4 9 16 25.........

Create sequnce 1 4 9 16 25......... upto entered input value using matlab scripting commands. Let y be output and x be input

1 year ago

Solved

Find the logic

There exists one logic in between input and output. Find it (easy math). Example 1: x=13 then y=339; Example 2: x=26...

1 year ago

Solved

Triangle Numbers Below N

This is an offshoot of <http://www.mathworks.com/matlabcentral/cody/problems/5-triangle-numbers Cody Problem 5: Triangle Numbers...

1 year ago

Solved

Multiply a column by a row

* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

1 year ago

Solved

Who has power to do everything in this world?

There is only one person who is older than this universe. He is Indian version of Chuck Norris.

1 year ago

Solved

Tell me the slope

Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

1 year ago

Solved

CONVERT TAN TO SIN

In a right angle triangle ABC given the tan(A) then find sin(A) For example tan(A)=3/4 then sin(A)=3/5

1 year 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

1 year ago

Solved

Divide by 4

Given the variable x as your input, divide it by four and put the result in y.

1 year ago

Solved

First N Perfect Squares

*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

1 year ago

Solved

Area of a triangle

A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.

1 year ago

Solved

Deleting an element in a matrix

For vector Grades=[98 56 78 34 100 88 87], delete the number 78 to get the following matrix Grades=[98 56 34 100 88 87] **re...

1 year ago

Solved

Temperature conversion

Convert temperature in degrees Celsius (C) to temperature in degrees Kelvin (K). Assume your answer is rounded to the nearest Ke...

1 year ago

Solved

Sorted highest to lowest?

Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

1 year ago

Solved

Roots

Find out the roots of a given polynomial equation.Given are the coefficients of the equation.

1 year ago

Solved

Is the Point in a Circle?

Check whether a point or multiple points is/are in a circle centered at point (x0, y0) with radius r. Points = [x, y]; c...

1 year ago

Answered

How can I determine the angle between two vectors in MATLAB?

function angle_in_degrees = vector2angle(u,v) a= sqrt(u(1)^2+u(2)^2+u(3)^2); b=sqrt(v(1)^2+v(2)^2+v(3)^2); c=0; for ...

How can I determine the angle between two vectors in MATLAB?

function angle_in_degrees = vector2angle(u,v) a= sqrt(u(1)^2+u(2)^2+u(3)^2); b=sqrt(v(1)^2+v(2)^2+v(3)^2); c=0; for ...

1 year ago | 0

Solved

Angle between two vectors

You have two vectors , determine the angle between these two vectors For example: u = [0 0 1]; v = [1 0 0]; The a...

1 year ago

Solved

Write a code that will follow the equation y = x * (x + x) * x.

If x = 5, y = 5 * (5+5) * 5 = 250

1 year ago

Solved

Find all elements less than 0 or greater than 10 and replace them with NaN

Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

1 year ago

Solved

Column Removal

Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; ...

1 year ago

Solved

Determine if input is odd

Given the input n, return true if n is odd or false if n is even.

1 year ago