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 Celsi...
1 year ago
Solved
Times 2 - START HERE
Try out this test problem first.
Given the variable x as your input, multiply it by two and put the result in y.
Examples:...
Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle.
<<https://i.imgu...
Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so:
x = [1 2 3 4]
Commas are optional, s...
1 year ago
Solved
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;...
1 year ago
Solved
First N Perfect Squares
*Description*
Return the first N perfect squares
*Example*
input = 4;
output = [ 1 4 9 16 ];
Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.
1 year ago
Solved
Datetime basics
Generate the datetime scalar representing the current date
1 year ago
Solved
So many choices
For inputs _n_ and _k_ (in that order), output the number of ways that k objects can be chosen from amongst n distinct objects. ...
1 year ago
Solved
Combinations without using nchoosek
You have to generate a matrix with all possible combinations of n elements *taken 2* at a time, *without using nchoosek(1:n,2)* ...
Calculate area of sector
A=function(r,seta)
r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...