Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.
2일 전
문제를 풀었습니다
varargin
Write a function that can take a diffrent Amount of inputs for every run Which gives you the sum of all Inputs.
Example:
f(a,b...
2일 전
문제를 풀었습니다
Calculate the h-index (revisited)
H-index is a powerful tool for quantifying the scientific contribution of a researcher. The
H-index is defined as follows (fro...
2일 전
문제를 풀었습니다
Is this triangle right-angled?
Given any three positive numbers a, b, c, return true if the triangle with sides a, b and c is right-angled. Otherwise, return f...
2일 전
문제를 풀었습니다
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.
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...
Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1.
Hint: use increment.
2일 전
문제를 풀었습니다
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 ...
2일 전
문제를 풀었습니다
Create a vector
Create a vector from 0 to n by intervals of 2.
2일 전
문제를 풀었습니다
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...