Solved


Eliminate unnecessary polygon vertices
Suppose you have an n-point polygon represented as an n-by-2 matrix of polygon vertices, P. Assume that the polygon is closed; t...

meer dan 8 jaar ago

Solved


Find Rotated Substring
Given a string s1, find if a rotated version of s1 is present in a second string s2. For example, rotated version of some str...

meer dan 8 jaar ago

Solved


The Birthday Phenomenon
First off, leap years are not being considered for this. In fact the year that people are born shouldn't be taken into considera...

meer dan 8 jaar ago

Solved


N-Queens Checker
Picture a chessboard populated with a number of queens (i.e. pieces that can move like a queen in chess). The board is a matrix,...

meer dan 8 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 ...

meer dan 8 jaar ago

Solved


07 - Common functions and indexing 6
Create a variable _m_ as a magic square with the size 6 x 6 Magic squares are defined as square matrices, where the sum of a...

meer dan 8 jaar ago

Solved


04 - Scalar Equations 1
Define the variable a: <<http://samle.dk/STTBDP/Assignment1_4-a.png>> Use this to calculate x: <<http://samle.dk/STTBD...

meer dan 8 jaar ago

Solved


Celcius to Kelvin
Convert Celsius degrees to Kelvin temperature.

meer dan 8 jaar ago

Solved


Rounding
Round 10.67 and make 'y' equal to that number.

meer dan 8 jaar ago

Solved


03 - Matrix Variables 5
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3e.png>>

meer dan 8 jaar ago

Solved


03 - Matrix Variables 2
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3b.png>> A 9x9 matrix of zeros, but with the following v...

meer dan 8 jaar ago

Solved


02 - Vector Variables 4
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2d.png>> (Logarithmically spaced numbers between 1 and 1...

meer dan 8 jaar ago

Solved


Function definition: BMI calculator
Define a function CalculateBMI with inputs massKg and heightCm. The function returns bodyMassIndex. The function should be able ...

meer dan 8 jaar ago

Solved


02 - Vector Variables 5
_eVec_ = _Hello_ ( _eVec_ is a string, which is a vector of characters )

meer dan 8 jaar ago

Solved


02 - Vector Variables 3
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2c.png>> (all the numbers from 5 to -5 in increments of ...

meer dan 8 jaar ago

Solved


02 - Vector Variables 1
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2a.png>>

meer dan 8 jaar ago

Solved


Logical operators: Flipping bits
The xor operator will toggle the bit if the bit is xored with 1. Ex: 1 XOR 0 = 1, 1 XOR 1 = 0. The xor operator will retain th...

meer dan 8 jaar ago

Solved


Constructing strings
* Construct a string alphaString from 'a' to endLetter, using the double colon operator. Ex: If endLetter = 'e', then alphaSt...

meer dan 8 jaar ago

Solved


Logical operators and arrays: 3-input and truth table
Given 3 inputs (inputA, inputB, inputC), assign threeInputAnd with the truth table outcomes for a 3 variable logical-and operati...

meer dan 8 jaar ago

Solved


Logical variables: Running late?
* Assign onTime with true if noTraffic is true and gasEmpty is false.

meer dan 8 jaar ago

Solved


Nth root.
* Assign outValues with the nth root of the inValues, the root is specified by rootValue

meer dan 8 jaar ago

Solved


Indexing the array: Shift right with variable sized arrays
* Write a statement to shift the array contents 1 position to the left. * Assign the rightmost element with -1. Ex: [12, 85...

meer dan 8 jaar ago

Solved


Relational operators and row arrays: Run times
* Construct a row array fastRunTimes containing all elements of runTimes equal to or less than 480 seconds. Ex: If runTimes =...

meer dan 8 jaar ago

Solved


Multiple element-wise operations: Percent change
Row arrays sales2013 and sales2014 reflect the quarterly sales (in millions) of a popular potato chip company. Write a statement...

meer dan 8 jaar ago

Solved


Extracting data: Heart rate (pulse)
The resting heart rate for an average adult is 60 - 100 beats per minute. Assign row array heartExtracted with all values in row...

meer dan 8 jaar ago

Solved


Constructing column arrays
* Construct a column array elevatorStops with values 2, 4, 5, 9, and 10

meer dan 8 jaar ago

Solved


Column arrays: Transpose a row array
* Construct a row array countValues with elements 1 to endValue, using the colon operator. * Transpose countValues to result in...

meer dan 8 jaar ago

Solved


Function call in expression: Reduced pricing.
Write a single statement that assigns cartTotal with the discounted cost of items 1 and 2. Function DiscountedPrice will return ...

meer dan 8 jaar ago

Solved


Adding an element: Ticker tape
* Add stockPrice to the beginning of row array tickerTape

meer dan 8 jaar ago

Solved


Variable sized row arrays
* Reverse the contents of row array mileMarkers

meer dan 8 jaar ago

Load more