Solved

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

environ 6 ans ago

Solved

Filter AC, pass DC

Input x is the sampled signal vector, may have both AC and DC components. Output vector y should not contain any AC component. ...

environ 6 ans ago

Solved

Basic arrays operations.

Apply element-by-element binary operation 'fun' to two arrays (A and B).

environ 6 ans ago

Solved

Transpose

Write a MATLAB script in order to convert a random length row vector (v) into a column vector.

environ 6 ans ago

Solved

DC chopper

Input x is the sampled signal vector, may have both AC and DC components. output vector y should have AC components removed then...

environ 6 ans ago

Solved

Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]

The given function returns the index of the maximum value in a given matrix. such as X=[4,3,4,5,9,12,0,5] Ans= 6 if maxim...

environ 6 ans ago

Solved

Who has power to do everything in this world?

There is only one person who is older than this universe. He is Indian version of Chuck Norris.

environ 6 ans ago

Solved

Temperature conversion

Convert temperature in degrees Celsius (C) to temperature in degrees Kelvin (K). Assume your answer is rounded to the nearest Ke...

environ 6 ans ago

Solved

Given area find sides

In a right angle triangle given area 'A' one arm=x, another arm=2x then find the value of x. For example, area A=400 then ...

environ 6 ans ago

Solved

Volume and area of a sphere

Input(r) - radius Output([v,s]) - volume and area

environ 6 ans ago

Solved

Find the hypotenuse

Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

environ 6 ans ago

Solved

Say something funny

Say something funny, or not. Your solution will be (fully automatically and objectively) scored based on how clever or funny ...

environ 6 ans ago

Solved

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

environ 6 ans ago

Solved

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

environ 6 ans ago

Solved

Find the nearest integer

Given a vector of integers and a real number find the closest integer. EX: >> a = [2 4 5 6 8 10]; >> b = 4.6; >> nea...

environ 6 ans ago

Solved

Unit Matrix

Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

environ 6 ans ago

Solved

sum of first 'n' terms

Given n=10, find the sum of first 'n' terms Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these n=10 terms is 55...

environ 6 ans ago

Solved

Sum the Digits of a Number

Given an integer, sum the digits repeatedly until you end up with a single value less than 10. For example, if you add the di...

environ 6 ans ago

Solved

Create a vector whose elements depend on the previous element

The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...

environ 6 ans ago

Solved

Remove white space from the string

Remove the white spaces (trailing and leading) from the input variable

environ 6 ans ago

Solved

Getting the absolute index from a matrix

This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to get the <http://www.ma...

environ 6 ans ago

Solved

Create a two dimensional zero matrix

You have to create a zero matrix of size (mxn) whose inputs are m and n and the elements of your matrix should be zeros. Exam...

environ 6 ans ago

Solved

What percentage?

Calculate the output c as the percentage of a on b for given a and b.

environ 6 ans ago

Solved

Find out missing number from a vector of 9 elements

You are given a vector of size 9, x = [x1 x2 x3 x4 x5 x6 x7 x8 x9] Elements of x may be randomly selected without repeati...

environ 6 ans ago

Solved

Stuff the Board

You have a stack of tiles to put onto an array-like playing board. Each tile has a number (always an integer), and the board var...

environ 6 ans ago

Solved

Scoring for oriented dominoes

Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...

environ 6 ans ago

Solved

Solitaire Cipher

Implement the <http://en.wikipedia.org/wiki/Solitaire_(cipher) solitaire cipher>. Since this is from Wikipedia, I am capturin...

environ 6 ans ago

Solved

Find a subset that divides the vector into equal halves

Given a vector x, return the indices to elements that will sum to exactly half of the sum of all elements. Example: Inpu...

environ 6 ans ago

Solved

How long is the longest prime diagonal?

Stanislaw Ulam once observed that if the counting numbers are <http://en.wikipedia.org/wiki/Ulam_spiral arranged in a spiral>, t...

environ 6 ans ago