Risolto


middleAsColumn: Return all but first and last element as a column vector
Given input A, return all but the first and last elements, arranged as a column vector. (I.e., all dimensions after the first s...

circa 5 anni fa

Risolto


Create a vector whose elements depend on the previous element
The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...

circa 5 anni fa

Risolto


Laws of motion 4

circa 5 anni fa

Risolto


Laws of motion 3

circa 5 anni fa

Risolto


Laws of motion 1

circa 5 anni fa

Risolto


Laws of motion 5

circa 5 anni fa

Risolto


Laws of motion 2

circa 5 anni fa

Risolto


Kinetic energy calculation

circa 5 anni fa

Risolto


Potential energy calculation

circa 5 anni fa

Risolto


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

circa 5 anni fa

Risolto


Matrix for beginners
Multiply x and y elemwise.

circa 5 anni fa

Risolto


Matrix problem for beginners
Make a matrix [0,0,0;1,1,1;2,2,2]. X=[0,1,2]

circa 5 anni fa

Risolto


Problem for beginners
Suppose that x is a column vector, with at least a length of 6. Delete the 2., 6., and the second last row. Example: X=[1;2;3...

circa 5 anni fa

Risolto


Stairs
Make an n by n matrix, where the elements are ones and zeros. In the main diagonal, and under that, there should be only ones (...

circa 5 anni fa

Risolto


Square
X is a number, write a code, where Y should be the square of X.

circa 5 anni fa

Risolto


Simple Matrix
Make the following matrix without typing it in one by one. [1 2 3; 2 4 6; 4 8 12] x=[1 2 3].

circa 5 anni fa

Risolto


Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

circa 5 anni fa

Risolto


Problem for beginners
M is a nxm matrix. Swap the fist and the second last column with eachother. X=[1 2 3;4 5 6;7 8 9] Y=[2 1 3;5 4 6;8 7 9]

circa 5 anni fa

Risolto


Mid-term report
You just got your mid-term report, but it's full of ones and twos :(. So before you give it to your parents, you change it, in o...

circa 5 anni fa

Risolto


determine amount cookies left
started with 3 cookies and you never ate any how many are left

circa 5 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 5 anni fa

Risolto


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

circa 5 anni fa

Risolto


currency converter
given a rate of exchange calculate the equivalent units of 100 USD

circa 5 anni fa

Risolto


Finding an element in a vector
x is a vector of unknown length your function should return the index of the first element in the vector that is greater than...

circa 5 anni fa

Risolto


Change string to number
Change given string to number. (hint: there is already function) Changing from ['1234'] to [1234] is one of example

circa 5 anni fa

Risolto


Positive Infinity
Round the array a towards positive infinity

circa 5 anni fa

Risolto


Values in Array
How many values are in the array

circa 5 anni fa

Risolto


Prime Letters = Removing
Given a string, remove all the letters which in ASCII Code are prime numbers. For Example: s1 = 'Determine which array e...

circa 5 anni fa

Risolto


pressure to dB?
given x ratio of pressure, find corresponding y dB

circa 5 anni fa

Risolto


interesting center of magic matrix
output the centre of magic matrix of n input=7; output=25

circa 5 anni fa

Carica altro