Risolto


Eye Squared
For a positive integer |n| create the identity matrix with |n| elements. In case it is not possible to produce an identity ma...

circa 6 anni fa

Risolto


Volume and area of a sphere
Input(r) - radius Output([v,s]) - volume and area

circa 6 anni fa

Risolto


Compute LOG(1+X) in natural log
Compute LOG(1+X) in natural log

circa 6 anni fa

Risolto


Create vector as shown in test cases
Create vector as shown in test cases

circa 6 anni fa

Risolto


Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

circa 6 anni fa

Risolto


Element by element multiplication of two vectors
Given two input vectors, return the element-by-element product. Example A = [1 2 3] B = [7 3 1] The answer should be...

circa 6 anni fa

Risolto


Find the area of a triangle
Given a triangle with a base b and height h, return the triangle area.

circa 6 anni fa

Risolto


What's size of TV?
Many people buy TV. Usually they ask about diagonal. But also important are width and height. Let's assume that all TV have rati...

circa 6 anni fa

Risolto


Cumulative product of a vector
Cumulative product of a vector example x=[1 2 5 10], then answer must be [ 1 2 10 100] *If you like this prob...

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


Separate even from odd numbers in a vector - with a loop
*Using a loop*, rearrange a vector of integers such that the odd numbers appear at the beginning, and even numbers at the end. T...

circa 6 anni fa

Risolto


Matrix with different incremental runs
Given a vector of positive integers a = [ 3 2 4 ]; create the matrix where the *i* th column contains the vector *1:a(i)...

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


Write a function man that takes a row vector v and returns a matrix H as follows..
Write a function called man that takes a row vector v as an input and returns a matrix H whose first column consist of the eleme...

circa 6 anni fa

Risolto


Set some matrix elements to zero
First get the maximum of each *row*, and afterwards set all the other elements to zero. For example, this matrix: 1 2 3 ...

circa 6 anni fa

Risolto


If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...

circa 6 anni fa

Risolto


BASICS - sum part of vector
Please make a function, where as input you get vector "x" and and vector "c", where in "c" vector you get indexes to sum. Examp...

circa 6 anni fa

Risolto


Sum of first n terms of a harmonic progression
Given inputs a, d and n, return the sum of the first n terms of the harmonic progression a, a/(1+d), a/(1+2d), a/(1+3d),....

circa 6 anni fa

Risolto


Rotate Matrix @180 degree
Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...

circa 6 anni fa

Risolto


Find the largest number
Given a vector v with 4 elements, find the largest number x. Example: Input: v = [4 7 1 6]; Output: x = 7; You mu...

circa 6 anni fa

Risolto


Vector Multiplication
Vector Multiplication of three matrix as shown in test cases.

circa 6 anni fa

Risolto


The Top 5 Primes
This problem series invites you to solve two simple problems related to the integer NUMBER FIVE, in order to celebrate <https://...

circa 6 anni fa

Risolto


Find nth maximum
Find nth maximum in a vector of integer numbers. Return NaN if no such number exists. x = [2 6 4 9 -10 3 1 5 -10]; So ...

circa 6 anni fa

Risolto


Transpose of matrix
Transpose of matrix as per test cases

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


Colon operator of two vectors
You are given two vectors of equal length: VecStart, VecEnd Each vector contain a set of integers, where VecEnd(j)>=VecStar...

circa 6 anni fa

Risolto


Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

circa 6 anni fa

Risolto


Sum of adjacent elements in a vector
Given a vector v, return a vector s containting the sum of every two adjacent elements in the vector. Every element s(i) cont...

circa 6 anni fa

Risolto


Sum of Two Numbers
Given two integer numbers x and y, calculate their sum and put it in z. Examples: Inputs x = 2, y = 4 Output z is 6 ...

circa 6 anni fa

Risolto


Horizontal matrix sort
Given a matrix x with n rows and m columns, return a matrix y with n rows and 2m columns, such that every row in x is sorted fro...

circa 6 anni fa

Carica altro