Weighted average
Given two lists of numbers, determine the weighted average.
Example
[1 2 3] and [10 15 20]
should result in
33.333...
7 years ago
Solved
kmph to mps
convert kilometer per hour to meter per second
7 years ago
Solved
Create a vector
Create a vector from 0 to n by intervals of 2.
7 years ago
Solved
Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes.
---
You may already know how to <http://www.mathworks....
7 years ago
Solved
Convert from Fahrenheit to Celsius
Given an input vector |F| containing temperature values in Fahrenheit, return an output vector |C| that contains the values in C...
7 years ago
Solved
Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle.
<<http://upload....
Maximum value in a matrix
Find the maximum value in the given matrix.
For example, if
A = [1 2 3; 4 7 8; 0 9 1];
then the answer is 9.
7 years ago
Solved
Check if number exists in vector
Return 1 if number _a_ exists in vector _b_ otherwise return 0.
a = 3;
b = [1,2,4];
Returns 0.
a = 3;
b = [1,...
7 years ago
Solved
Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x.
For instance if x=2 then y must be 1+2+3+4=10.