Resuelto


Triangle sequence
A sequence of triangles is constructed in the following way: 1) the first triangle is Pythagoras' 3-4-5 triangle 2) the second...

10 meses hace

Resuelto


Length of a short side
Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...

10 meses hace

Resuelto


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

10 meses hace

Resuelto


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

10 meses hace

Resuelto


Create a vector
Create a vector from 0 to n by intervals of 2.

10 meses hace

Resuelto


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not to use d...

10 meses hace

Resuelto


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

10 meses hace

Resuelto


Find max
Find the maximum value of a given vector or matrix.

10 meses hace

Resuelto


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

10 meses hace

Resuelto


Inner product of two vectors
Find the inner product of two vectors.

10 meses hace

Resuelto


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

10 meses hace

Resuelto


Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

10 meses hace

Resuelto


Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

10 meses hace

Resuelto


Remove all the words that end with "ain"
Given the string s1, return the string s2 with the target characters removed. For example, given s1 = 'the main event' your ...

10 meses hace

Resuelto


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

10 meses hace

Resuelto


De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

10 meses hace

Resuelto


Quote Doubler
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...

10 meses hace

Resuelto


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

10 meses hace

Resuelto


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

10 meses hace

Resuelto


Add 2 to any number.
Add 2 to any number.

10 meses hace

Resuelto


Problem 44444 !!! free beer everyone
just say hallelujah to solve this problem

10 meses hace

Resuelto


free points
function y = your_fcn_name(x) y = x(1)+x(2); end

10 meses hace

Resuelto


Convert radians to degrees
Given input in radians, output to degrees

11 meses hace

Resuelto


Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

11 meses hace

Resuelto


Pizza!
Given a circular pizza with radius z and thickness a, return the pizza's volume. [ z is first input argument.] Non-scored bonus...

11 meses hace

Resuelto


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

11 meses hace

Resuelto


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

11 meses hace

Resuelto


Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

11 meses hace

Resuelto


Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

11 meses hace

Resuelto


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

11 meses hace

Cargar más