Solved


Sum the main diagonal of a matrix
Given a square matrix, return the sum of its main diagonal elements. Example: diag_sum([1 2 3; 4 5 6; 7 8 9]) returns 15

22 days ago

Solved


Determine if a number is prime
Given a positive integer n, return 1 if it is prime, 0 otherwise. Example: is_prime(7) returns 1, is_prime(4) returns 0

22 days ago

Solved


Keep Only Even Numbers
Given a vector, return a new vector containing only the even numbers in their original order. Example: keep_evens([1 2 3 4 5 6])...

22 days ago

Solved


Convert Celsius temperature to Fahrenheit
Given a temperature in Celsius, return the equivalent in Fahrenheit. Formula: F = C * 9/5 + 32Example: cel2fahr(100) returns 212...

22 days ago

Solved


Remove Unique Elements
Given a list of integers, we want to keep only the non-unique elements in this list. To do this, we need to remove all the uniqu...

22 days ago

Solved


Hofstadter Female and Male sequences
The Hofstadter Female (F) and Male (M) sequences are defined as follows Write a function to compute for a given n. See http...

22 days ago

Solved


Hofstadter Q sequence
The Hofstadter Q sequence is defined as follows: The first elements of the sequence are 1, 1, 2, 3, 3, 4, 5, 5, 6, 6. Write ...

22 days ago

Solved


Piston Mean Speed
Mean piston speed is a critical mechanical stress indicator. It sets limits on valve timing, bearing loads and material fatigue...

22 days ago

Solved


Find the summation of factorial series
Factorial numbers are n! = 1*2*3....*n the series is 1!, 2!, 3!,........, n!

24 days ago

Solved


Count the Even Digits in a Number
Given a positive integer n, write a function that returns how many digits of n are even. Even digits are: 0, 2, 4, 6, 8

24 days ago

Solved


Find out if the given number is a square of natural number.
For example , Input =4,output =1 Input=1,output=1 Input=0,output=0 Input=8,output=0

24 days ago

Solved


If-Else
If a more than zero, b = true, else, b = false.

24 days ago

Solved


Volumetric efficiency
Volumetric efficiency measures how well an engine breathes. The ratio of the actual air mass drawn in per cycle to the theoreti...

24 days ago

Solved


Juros Simples
Faça uma função que calcule o montagem de um investimento com juros simples que receba como argumentos o capital inicial C, a ta...

24 days ago

Solved


Point on a line
Find the slope of the straight line between the points a and b. Then find y at x=20.

24 days ago

Solved


X-intercepts of a quadratic.
Find the y value of the quadratic of the function at a point x.

24 days ago

Solved


Instructions Following
Complete the function follow(s) which, for a given string (containing only the letters 'f', 'b', 'l', 'r'), calculates the final...

24 days ago

Solved


Variance computation (★★★)
Given a vector x with several values, compute the variance, whose formula is given by: <<https://i.imgur.com/Wg95KBE.gif>> ...

24 days ago

Solved


Matrix Rotation
Write a MATLAB function that rotates a given matrix by 90 degrees clockwise. The rotation should be performed in-place, without ...

24 days ago

Solved


Basic Algebra II
You have the equation X^2 = n you should find the value of X. GOOD LUCK!

24 days ago

Solved


Addition
Add together the values of a and b.

24 days ago

Solved


Engine torque and RPM
Torque and power are related through rotational speed. Knowing brake power and engine RPM, you can back-calculate the torque del...

24 days ago

Solved


Classification metrics

24 days ago

Solved


P(girl likes you | she smiled at you)
Compute the probability Given the input probabilities

24 days ago

Solved


Basic Physics IV
Calculate the Work.

24 days ago

Solved


Find the number of diagonals in a n sided polygon.
Find the number of diagonals in a n sided polygon.

24 days ago

Solved


Turning radius of a vehicle
The turning radius represents the radius of the circular path followed by a vehicle. Given Wheelbase L and Steering angle δ, Co...

24 days ago

Solved


OR
If a greater than zero or c less than 10, b = true, else, b = false.

24 days ago

Solved


Basic Algebra III
Get the Cube Root of the number n.

24 days ago

Load more