Solved

Simple equation: Annual salary

Given an hourly wage, compute an annual salary by multiplying the hourly wage times 40 and times 50, because annualSalary = hour...

5 years ago

Solved

Matlab Basics II - Free Fall

An object freely falling from rest under gravity covers a distance x given by: x = 1/2 gt^2 write a function that calculat...

5 years ago

Solved

Matlab Basics II - Create a vector with a repeated entry

Create a row vector of length n, filled with 4's, for example, if n = 3 output = [4 4 4] make sure to round UP when n is a...

5 years ago

Solved

Number of problems

No, you don't read it wrong: this assignment is to return the number of this problem (and not the problem of this number).

5 years ago

Solved

ベクトル [1 2 3 4 5 6 7 8 9 10] の作成

MATLABでは,角括弧の中に要素を入れることで、ベクトルを作成できる。 x = [1 2 3 4] また次のようにも書ける（コンマはオプション）。 x = [1, 2, 3, 4] 問題：次のベクトルを出力する関数を作成せよ。...

5 years ago

Solved

Snakes on a plane

Given the dimensions of a 2-d plane, create a matrix where a "snake" of ones occupies the plane from top left to bottom right. ...

5 years ago

Solved

Find out sum of all elements of given Matrix

Find out sum of all elements of given Matrix A=[1 2 3;4 5 6 ;7 8 9]; Answer must be: 45 *If you like this problem, pl...

5 years ago

Solved

Sort complex numbers into complex conjugate pairs

Sort complex numbers into complex conjugate pairs. Example: Input x = [3-6i -1-4i -1+4i 3+6i] Sorted output = [-1 - ...

5 years ago

Solved

Population growth

Assign finalPopulation with the population size given an initial population, population growth rate, and number of years. The po...

5 years ago

Solved

Write an expression

Assigns finalResult with firstSample plus secondSample, divided by 3. Ex: If firstSample is 18 and secondSample is 12, finalResu...

5 years ago

Solved

Coordinate geometry

Assign pointsDistance with the distance between point (x1, y1) and point (x2, y2). The distance is calculated by: Distance =...

5 years ago

Solved

Matlab Basics - Logical Tests I

Write a script to test whether a year number is for a leap year or not. eg. x = 1884 output = 1 eg. x = 3 output = 0

5 years ago

Solved

Find Factrorial without using built-in function

A number is given, you have to find the factorial of the number without using built-in factroial function. You may use loops....

5 years ago

Solved

The rabbit problem

Someone discovered that rabbits reproduce at the rate of fibonnaci so you just input the number and it will print the fibonnaci ...

5 years ago

Solved

When can one be the Life Member of the IEEE?

Consult the site http://en.wikipedia.org/wiki/Ieee from where it can be seen that IEEE Members who have reached the age of 65 an...

5 years ago

Solved

Calculate the nth Fibonacci number USING 'Golden Ratio' concept

f = [1 1 2 3 5 8 13 ...] If n=6, f(6)=8

5 years ago

Solved

Find the elements of a matrix according to a defined property.

From A = [5,2,3] and B = [1,2,3,4,5,6,7,8,9,10] produce a vector C where : C(1) is the sum of the first A(1) elements of B, ...

5 years ago

Solved

Pluralization

Define function plu(n) that returns '' (an empty string) if n=1, or 's' otherwise. This is handy for displaying messages from a...

5 years ago

Solved

Computing wind chill

On a windy day, a temperature of 15 degrees may feel colder, perhaps 7 degrees. The formula below calculates the "wind chill," i...

5 years ago

Solved

Compute total cost

A drink costs 2 dollars. A taco costs 3 dollars. Write a statement that assigns totalCost with the total meal cost given the num...

5 years ago

Solved

Generate the Matrix!

Given n, generate the following matrix: a = [ n n-1 n-2 ... 2 1; n-1 n-1 n-2 ... 2 1; n-2 n-2 n-2 ... 2 1;...

5 years ago

Solved

What is Sum Of all elements of Matrix

Given the matrix x, return the sum of all elements of matrix. Example: Input x = [ 1 2 0 0 0 0 6 9 3 3 ] ...

5 years ago

Solved

Beginner's Problem - Squaring

Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

5 years ago

Solved

2倍してみよう - ここからスタート！

初めにこの問題を試してみよう。 入力としてxを与え、それを2倍して結果をyに代入せよ。 Examples: Input x = 2 Output y is 4 Input x = 17 Output y is 34 ...

5 years ago

Solved

Find the area of the four walls

If length, breadth and height of the walls are given, find the area of the four walls.

5 years ago

Solved

Solving a quadratic equation

Given a, b and c, Return the solution of the following quadratic equation: a*x^2 + b*x + c = 0.

5 years ago

Solved

Average of square wave

given positive and negative peak , calculate dc level, 50% duty cycle

5 years ago

Solved

Find the square of the sum of the digits of a number

If a number (n) is provided as an input, find the square of the sum of the digits of the number. Example If n = 21, the an...

5 years ago

Solved

Basics: Divide integers to get integer outputs in all cases

Divide integers a and b in such a way that output y is always an integer (in ceil manner)

5 years ago

Solved

Y=X

Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

5 years ago