Community Profile

# Sami Qorchi

86 total contributions since 2017

View details...

Contributions in
View by

Solved

Check to see if a Sudoku Puzzle is Solved
*Description:* Your task, should you choose to accept it, is to make a function that checks to see if a 9x9 matrix of integer...

oltre un anno ago

Solved

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

oltre un anno ago

Solved

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

oltre un anno ago

Solved

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

oltre un anno ago

Solved

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

oltre un anno ago

Solved

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

oltre un anno ago

Solved

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

oltre un anno ago

Solved

inner product of two vectors
inner product of two vectors

oltre un anno ago

Solved

Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

oltre un anno ago

Solved

Multiply a column by a row
* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

oltre 2 anni ago

Solved

Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...

oltre 2 anni ago

Solved

Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

oltre 2 anni ago

Solved

Do Fast Fourier Transformation
Example Fast Fourier Transformation from vector [2,1]) ans = 3 1

oltre 2 anni ago

Solved

Create cosine function out of sine

oltre 2 anni ago

Solved

Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

oltre 2 anni ago

Solved

Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

oltre 2 anni ago

Solved

Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

oltre 2 anni 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.

oltre 2 anni ago

Solved

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

oltre 2 anni ago

Solved

Compress strings (not springs)
Please remove excess space, limit one space between others, and no space before punctuation marks. * For example, 'Trendy , ...

oltre 2 anni ago

Solved

Cell Counting: How Many Draws?
You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...

oltre 2 anni ago

Solved

letter yes yes & letter no no
Split a string into two strings, wherein the first string has all alphabetic letters and the second string has all the remaining...

oltre 2 anni ago

Solved

Reverse the Words (not letters) of a String
*Description* Change the words of a string such that the words appear in reverse order. You may assume that the string is a n...

oltre 2 anni ago

Solved

Space Saver
Remove all characters that are below a space in ASCII value.

oltre 2 anni 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...

oltre 2 anni ago

Solved

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

oltre 2 anni ago

Solved

Square Diagonal
If n is the given number, then make a diagonal matrix of size 2*2 with the square of that number.

oltre 2 anni ago

Solved

CONVERT TAN TO SIN
In a right angle triangle ABC given the tan(A) then find sin(A) For example tan(A)=3/4 then sin(A)=3/5

oltre 2 anni ago

Solved

Squaring Matrix
Square the following matrix using matlab % A = 1 2 3 4 5 6 7 8 So new matrix should display...

oltre 2 anni ago

Solved

cross in array
Make a cross from "1" in odd size array. Other value from array should be equal to "0"; As input you get length of side of arra...

oltre 2 anni ago