Solved


Create a vector of the first n natural numbers (★)
If n = 7, your program should return a vector y, where y = [1 2 3 4 5 6 7].

3 years ago

Solved


Function 1 (★)
Compute the value of <<https://i.imgur.com/AxKWLmE.gif>> for any given positive x.

3 years ago

Solved


Median computation (★)
Given a vector of values, compute the median. The median is defined as the middle value in a set of *sorted* data. Thus, if ...

3 years ago

Solved


Vector raised to a power, element-wise (★)
Given a vector A and a number x, raise each element of the vector to the power of x. Thus, if A = [2 5 7 1] and x = 0.5, then ...

3 years ago

Solved


Create a vector of the first n odd numbers (★)
If n = 10, your program should return a vector y, where y = [1 3 5 7 9 11 13 15 17 19].

3 years ago

Solved


Sum of elements in a vector (★)
(copy of Prob. 3) Find the sum of all the numbers of the input vector x. Input x = [1 2 3 5] Output y is 11 <> ...

3 years ago

Solved


Element-wise vector product (★)
Given two vectors x and y, compute their element-wise product z. Thus, if x = [1 3 5] and y = [0.5 -1 2], then z = [1*0.5...

3 years ago

Solved


Calculate days until Christmas
Provided with inputs year, month, day e.g. 2019,11,12, calculate the number of days until the next Christmas day, i.e. the next ...

3 years ago

Solved


Check if integer is a prime number
Check if integer i is a prime number. Returns logical true '1' if it is.

3 years ago

Solved


Calculate the area of a circle
Given a circle of diameter x calculate its area

3 years ago

Solved


Convert Fahrenheit to Kelvin
Convert the value f in Fahrenheit to Kelvin

3 years ago

Solved


Check if number is a square number
Test if integer i is a square number. Return logical true if it is.

3 years ago

Solved


Calculate the Number of Sign Changes in a Row Vector (No Element Is Zero)
For a row vector: V=[7 1 2 -3] there is one sign change (from 2 to -3). So, the function you write must return N=1. F...

3 years ago

Solved


Determinants
Given a square matrix(A), find the determinant(d). For example: A = [1,3;4,5] d = 1*5-4*3 = -7

3 years ago

Solved


Pernicious Anniversary Problem
Since Cody is 5 years old, it's pernicious. A <http://rosettacode.org/wiki/Pernicious_numbers Pernicious number> is an integer w...

3 years ago

Solved


Sophie Germain prime
In number theory, a prime number p is a *Sophie Germain prime* if 2p + 1 is also prime. For example, 23 is a Sophie Germain prim...

3 years ago

Solved


Assign numerical values to a structure with 1 field
The aim is to assign values to a multidimensional structure *without using for-loop or while-loop* Example with a structure ...

3 years ago

Solved


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

3 years ago

Solved


find the logic,easy one
find the logic behind, example x=18 y=306 x=53 y=2756

3 years ago

Solved


what's my tax amount this year ?
given an annual salary x and a tax rate i calculate the amount that you have to pay.Example x = 70000; i=.10 y_correc...

3 years ago

Solved


lb to kilogram
convert lb to kilogram units, easy

3 years ago

Solved


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

3 years ago

Solved


Sum all integers from 1 to 2^x
Given a number x, your function must return the summation of all integers from 1 to 2^x.

3 years ago

Solved


MPS to MPH
Given the speed in miles per second, find the speed in miles per hour.

3 years ago

Solved


Find the distance traveled by a car given velocity and time.
A car is traveling at a constant velocity for a specific amount of time. The function should use the two inputs, velocity and ti...

3 years ago

Solved


Energy-Mass Equivalence
Given input enegy of the object, E, and constant c = 300,000,000, find the mass of the object.

3 years ago

Solved


Kinetic Energy
Given mass, m, and kinetic energy, KE, find the velocity of the object.

3 years ago

Solved


Ounces to Kilograms
convert ounces to kilograms, easy

3 years ago

Solved


concatenate the elements
you should concatenate the elements of a matrix in one dimensional array, for example if the input is A = [1 2 3; 4 5 6; 7 ...

3 years ago

Solved


sum all digits
input = 123456789, output = 1+2+3+4+5+6+7+8+9 = 45

3 years ago

Load more