Solved

Matlab Basics - Rounding I

Write a script to round x DOWN to the next lowest integer: e.g. x = 2.3 --> x = 2 also: x = 2.7 --> x = 2

ongeveer 2 jaar ago

Solved

Do you like your boss?

Do you like your boss? Answer can be any string! For example: Boss = 'Do you like your boss?'; Output = 'yes' or ...

ongeveer 2 jaar ago

Solved

Number of Even Elements in Fibonacci Sequence

Find how many even Fibonacci numbers are available in the first d numbers. Consider the following first 14 numbers 1 1 2...

ongeveer 2 jaar ago

Solved

Matlab Basics - Set unwanted parts of a vector to zero

Consider a vector x, of length >= 7, write a script to set elements 2, 5, and 6 to zero. Example x = [1 2 3 4 5 6 7] --> ...

ongeveer 2 jaar ago

Solved

Speed of car

Calculate the Speed of car given its Distance travelled and time taken in x and y respectively

ongeveer 2 jaar 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.

ongeveer 2 jaar ago

Solved

Derivative of polynomial

Compute the derivative of a given polynomial. The input is an <http://www.mathworks.com/help/matlab/math/representing-polynomial...

ongeveer 2 jaar 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 ...

ongeveer 2 jaar ago

Solved

Rotate a Matrix

Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

ongeveer 2 jaar ago

Solved

Create an n-by-n null matrix and fill with ones certain positions

The positions will be indicated by a z-by-2 matrix. Each row in this z-by-2 matrix will have the row and column in which a 1 has...

ongeveer 2 jaar ago

Solved

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

ongeveer 2 jaar ago

Solved

Replace Nonzero Numbers with 1

Given the matrix x, return the matrix y with non zero elements replaced with 1. Example: Input x = [ 1 2 0 0 0 ...

ongeveer 2 jaar ago

Solved

Remove entire row and column in the matrix containing the input values

Remove the entire row and column from the matrix containing specific values. The specified value can be a scalar or a vector. Fo...

ongeveer 2 jaar ago

Solved

Find the numeric mean of the prime numbers in a matrix.

There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

ongeveer 2 jaar ago

Solved

Who Has the Most Change?

You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

ongeveer 2 jaar ago

Solved

Summing digits

Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

ongeveer 2 jaar ago

Solved

vector to string

Determine what the ASCII characters spell out. Example: input = [ 72 73 71 72] output = 'HIGH'

ongeveer 2 jaar ago

Solved

Area of a circle

Given the radius x, y would be the area of a circle. Pi = 3.1416

ongeveer 2 jaar ago

Solved

Change matrix to vector

Vector is a matrix whose size is 1 x n or n x 1. Change matrix to vector. x = 4 3 5 1 ...

ongeveer 2 jaar 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 ...

ongeveer 2 jaar ago

Solved

BASICS - sum part of vector

Please make a function, where as input you get vector "x" and and vector "c", where in "c" vector you get indexes to sum. Examp...

ongeveer 2 jaar ago

Solved

Armstrong Number

Determine whether the given input n-digit number is Armstrong Number or not. Return True if it is an Armstrong Number. An n-D...

ongeveer 2 jaar ago

Solved

Matrix FUN

Given a Matrix M, find out the number of elements of matrix that are divisible by 3. M = [1 2 3;4 5 6;7 8 9]; ou...

ongeveer 2 jaar ago

Solved

特定の値がベクトル内に含まれているかを確認するコードを書こう

ベクトル b にあるスカラ値 a が含まれていれば出力として 1 を返し、含まれていなければ 0 を返すような関数を作成しましょう。 例: a = 3; b = [1,2,4]; スカラ値 3 はベクトル b に含まれていない...

ongeveer 2 jaar ago

Solved

Omit columns averages from a matrix

Omit columns averages from a matrix. For example: A = 16 2 3 13 5 11 10 8 9 7 ...

ongeveer 2 jaar ago

Solved

Number of Horns on a unicorn!

Calculate the number of horns on a *unicorn*! And I'm talking about a unicorn with not more than one horn on it!

ongeveer 2 jaar ago