Community Profile

# Payam Morsali

##### Last seen: 3 days ago
206 total contributions since 2019

View details...

Contributions in
View by

Solved

Output any real number that is neither positive nor negative
Output any real number that is neither positive nor negative

3 days ago

Solved

Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

3 days ago

Solved

Insert zeros into vector
Insert zeros after each elements in the vector. Number of zeros is specified as the input parameter. For example: x = [1 ...

3 days ago

Solved

03 - Matrix Variables 3
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3c.png>> A 10x10 matrix where the numbers from 1 to 100 ...

3 days ago

Solved

Reverse a string
Reverse the given string. Example input = 'reverse' output = 'esrever'

3 days ago

Solved

Find remainder when x is divided by 3
Find remainder when x is divided by 3

3 days ago

Solved

Determina el número de cifras de un número
Crea una función que te devuelva el número de cifras de un número. Algunos ejemplos para ayudarte serían: El número 125 tie...

3 days ago

Solved

Replace multiples of 5 with NaN
It is required to replace all values in a vector that are multiples of 5 with NaN. Example: input: x = [1 2 5 12 10 7] ...

5 days ago

Solved

Find nth maximum
Find nth maximum in a vector of integer numbers. Return NaN if no such number exists. x = [2 6 4 9 -10 3 1 5 -10]; So ...

5 days ago

Solved

length of a vector
Find twice the length of a given vector.

6 days ago

Solved

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

6 days ago

Solved

Mid-term report
You just got your mid-term report, but it's full of ones and twos :(. So before you give it to your parents, you change it, in o...

6 days ago

Solved

Factorial Numbers
Factorial is multiplication of integers. So factorial of 6 is 720 = 1 * 2 * 3 * 4* 5 *6 Thus 6 factorial = factorial(720)....

6 days ago

Solved

Times 3 problem
When you enter the number, it should return the number multiplied by 3

6 days ago

Solved

Min of a Matrix
Return the minimum value in the given matrix.

6 days ago

Solved

Flipping
Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...

6 days ago

Solved

Love triangles
Given a vector of lengths [a b c], determines whether a triangle with non-zero area (in two-dimensional Euclidean space, smarty!...

6 days ago

Solved

Max of a Vector
Write a function to return the max of a vector

6 days ago

Solved

First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

6 days ago

Solved

ZigZag - 01
Given a matrix, return the elements that are on the Z form of the matrix. For example - a=[1,2,3; 4,5,6; 7,8,9] ...

8 days ago

Solved

Assess the scatter of wind turbines in a field
The renewable energy industry is on the rise in many countries--- and one of the key players is wind energy. It is believed ...

9 days ago

Solved

Find 0 in array
Given array find where there 0 is.

11 days ago

Solved

3rd side of a Triangle
Given two sides of a triangle, find the minimum and maximum possible area of the triangle. the length of the third side has t...

14 days ago

Solved

Sum of series
a(n) = n^2 - (n-1)^2 find the summation of the series upto n i.e. a(1)+a(2)+...+a(n)

23 days ago

Solved

Exponentiation
Given 3 integers b,e,k; find -- mod(b^e,k)

24 days ago

Solved

Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

3 months ago

Solved

Sum the Infinite Series
Given that 0 < x and x < 2*pi where x is in radians, write a function [c,s] = infinite_series(x); that returns with the...

3 months ago

Solved

4 months ago

Solved

Return the first and last character of a string
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

4 months ago

Solved

サイズが n*2n の "mirror" 行列（対称行列）を作成しましょう。 例: n=2 の場合、以下のような出力を返します。 m = [ 1 2 2 1 1 2 2 1 ] n = 3 の場合、以下のよう...

4 months ago