Sivakumar Ramakrishnan
Followers: 0 Following: 0
Feeds
已解决
Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2 3 3 3 4...
1 year 前
已解决
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.
1 year 前
已解决
Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displayed ...
1 year 前
已解决
Dimensions of a rectangle
The longer side of a rectangle is three times the length of the shorter side. If the length of the diagonal is x, find the width...
1 year 前
已解决
Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return true if the triangle with sides a, b and c is right-...
1 year 前
已解决
Length of a short side
Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...
1 year 前
已解决
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.
2 years 前
已解决
Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...
2 years 前
已解决
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...
2 years 前
已解决
Find the Oldest Person in a Room
Given two input vectors: * |name| - user last names * |age| - corresponding age of the person Return the name of the ol...
2 years 前
已解决
Write a code that will follow the equation y = x * (x + x) * x.
If x = 5, y = 5 * (5+5) * 5 = 250
4 years 前
已解决
Matlab Basics II - Count rows in a matrix
Write a function that returns that number of rows in a vector or matrix x example: x = [1; 2; 3] output = 3
4 years 前
已解决
Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.
4 years 前
已解决
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...
4 years 前
已解决
Matlab Basics II - Free Fall
An object freely falling from rest under gravity covers a distance x given by: x = 1/2 gt^2 write a function that calculat...
4 years 前
已解决
Matlab Basics II - Create a vector with a repeated entry
Create a row vector of length n, filled with 4's, for example, if n = 3 output = [4 4 4] make sure to round UP when n is a...
4 years 前
已解决
Calculate Amount of Cake Frosting
Given two input variables |r| and |h|, which stand for the radius and height of a cake, calculate the surface area of the cake y...
4 years 前
已解决
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:...
4 years 前
已解决
Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...
4 years 前