Risolto


04 - Scalar Equations 2
Define the variables a and b: <<http://samle.dk/STTBDP/Assignment1_4-a.png>> <<http://samle.dk/STTBDP/Assignment1_4-b.png>...

circa 11 anni fa

Risolto


Relational operators: Guessing game
Row array userGuess contains a sequence of user guesses. Create a logical indexing array correctGuess with true in each location...

circa 11 anni fa

Risolto


Integer indexing array: Shift left
Write a *single* statement that shifts row array attendanceValues one position to the left. The rightmost element in attendanceV...

circa 11 anni fa

Risolto


05 - Vector Equations 1
Define the vector _cVec_: <<http://samle.dk/STTBDP/Assignment1_2c.png>> (all the numbers from 5 to -5 in increments of -0....

circa 11 anni fa

Risolto


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

circa 11 anni fa

Risolto


Generate a NaN...on purpose
The goal is to create a function that will return a single "NaN" without using the nan function. I am interested to see how many...

circa 11 anni fa

Risolto


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

circa 11 anni fa

Risolto


Who invented zero?
We know the importance zero in computer science, mathematics... but who invented zero? Clue: He was the first in the line ...

circa 11 anni fa

Risolto


Add a block to a model
Produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/add-block-eqn.png>> In this case, the slope of...

circa 11 anni fa

Risolto


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

circa 11 anni fa

Risolto


Tree Height
Assign treeHeight with the tree height given the shadow length and angle of elevation. Simple geometry can compute the heigh...

circa 11 anni fa

Risolto


Declaring a string
* Assign streetAddress with the string 1313 Mockingbird Lane.

circa 11 anni fa

Risolto


length of a vector
Find twice the length of a given vector.

circa 11 anni fa

Risolto


Logical indexing: High scores
Row array gameScores contains all player scores. Construct a row array highScores than contains all player scores greater than 5...

circa 11 anni fa

Risolto


Character variable: Compass direction
* Assign compassDirection with sensorReading's value. Both are character variables.

circa 11 anni fa

Risolto


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

circa 11 anni fa

Risolto


Logical indexing: Player scores
Player 1 and player 2 take turns playing a game. Row array gameScores contains the scores of player 1, then player 2, then playe...

circa 11 anni fa

Risolto


Celcius to Kelvin
Convert Celsius degrees to Kelvin temperature.

circa 11 anni fa

Risolto


Create matrix of replicated elements
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. Example: Input: ...

circa 11 anni fa

Risolto


Equal to their cube
Tell me three real numbers that are equal to their cubes?

circa 11 anni fa

Risolto


Function definition: Volume of a pyramid
Define a function CalculatePyramidVolume with inputs baseLength, baseWidth, and pyramidHeight. The function returns pyramidVolum...

circa 11 anni fa

Risolto


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

circa 11 anni fa

Risolto


Arithmetic array operations
* Add x to each element of array temperatureReadings.

circa 11 anni fa

Risolto


Multi-line comments
* Fix the syntax errors.

circa 11 anni fa

Risolto


Indexing the last element: Print queue
* Delete the last element of row array printQueue.

circa 11 anni fa

Risolto


Construct an array
* Construct an row array named observedValues with elements sensorReading1, sensorReading2, and sensorReading3.

circa 11 anni fa

Risolto


Matrix which contains the values of an other matrix A at the given locations.
If you have two matrices, which together give xc and yc coordinates into another matrix, eg : xc = [1 1 1; 2 2 1]; ...

circa 11 anni fa

Risolto


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

circa 11 anni fa

Risolto


Number of digits in an integer
Specifies how many digits in a given integer. Example: in=100 ==> out=3

circa 11 anni fa

Risolto


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

circa 11 anni fa

Carica altro