Community Profile

Aseem Gill

56 2019 年以降の合計貢献数

Aseem Gill's バッジ

anshil's problem
Only anshil should solve ans = ''

Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

2ヶ月 前

Negative Infinity
Round the given array a towards negative infinity.

2ヶ月 前

Given a 4x4 matrix, swap the two middle columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...

2ヶ月 前

Area of a Square
Inside a square is a circle with radius r. What is the area of the square?

2ヶ月 前

2 b | ~ 2 b
Given a string input, output true if there are 2 b's in it, false if otherwise Examples: 'Macbeth' -> false 'Publius Cor...

2ヶ月 前

Square a Number
Given an input x, return y, which is equal to the square of x.

2ヶ月 前

Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

2ヶ月 前

Roots
Find out the roots of a given polynomial equation.Given are the coefficients of the equation.

2ヶ月 前

Convert Fahrenheit to Celsius
Calculate the Celsius temperature C given the Fahrenheit temperature F. Examples: Input F = 90 Output C is 32.22 I...

2ヶ月 前

Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

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...

2ヶ月 前

Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: \$99,999.99. E...

2ヶ月 前

Project Euler: Problem 5, Smallest multiple
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smalle...

2ヶ月 前

Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

2ヶ月 前

Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

2ヶ月 前

Create a vector
Create a vector from 0 to n by intervals of 2.

2ヶ月 前

Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

2ヶ月 前

Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

2ヶ月 前

Find max
Find the maximum value of a given vector or matrix.

2ヶ月 前

Get the length of a given vector
Given a vector x, the output y should equal the length of x.

2ヶ月 前

inner product of two vectors
inner product of two vectors

2ヶ月 前

Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

2ヶ月 前

Project Euler: Problem 2, Sum of even Fibonacci
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...

2ヶ月 前

Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

2ヶ月 前

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.

2ヶ月 前

Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

2ヶ月 前

Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

2ヶ月 前

Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

2ヶ月 前

Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

2ヶ月 前