A résolu


Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime nu...

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


03 - Matrix Variables 3
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3c.png>> A 10x10 matrix where the numbers from 1 to 100 ...

plus de 9 ans il y a

A résolu


Min of a Matrix
Return the minimum value in the given matrix.

plus de 9 ans il y a

A résolu


Back to basics 4 - Search Path
Covering some basic topics I haven't seen elsewhere on Cody. Return a string that is the user's portion of the current search...

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


Back to basics 15 - Benchmark
Covering some basic topics I haven't seen elsewhere on Cody. Return an array of the benchmark values for MATLAB.

plus de 9 ans il y a

A résolu


Back to basics 5 - Clipboard
Covering some basic topics I haven't seen elsewhere on Cody. Copy the input string to the clipboard

plus de 9 ans il y a

A résolu


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

plus de 9 ans il y a

A résolu


Back to basics 3 - Temp Directory
Covering some basic topics I haven't seen elsewhere on Cody. Return a string that is the path to the system's current temp di...

plus de 9 ans il y a

A résolu


Sum the numbers on the main diagonal
Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

plus de 9 ans il y a

A résolu


Replace Vector Elements
Replace all elements in a vector which are equal to or smaller than zero with 0.1. Example: A = [1 2 3 -1 0 2 -3 -80]; ...

plus de 9 ans il y a

A résolu


01 - Scalar variables
Create the following variables: <<http://samle.dk/STTBDP/Assignment1_1.png>>

plus de 9 ans il y a

A résolu


Make a 1 hot vector
Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...

plus de 9 ans il y a

A résolu


03 - Matrix Variables 1
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3a.png>> A 9x9 matrix full of 2's (Hint: use *ones* o...

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


Array resizing: Removing elements
* Remove elements 2, 4, and 6 from row array pendingTasks

plus de 9 ans il y a

A résolu


Integer indexing array: Reverse subsets
Construct an indexing array copySubset so that the statement reversedOrder = origOrder(copySubset); results in a row array begin...

plus de 9 ans il y a

A résolu


Linear-spaced points array
* Construct a row array plotPoints with 5 values that are spaced linearly from lowValue to highValue. Ex: If lowValue is 1 and ...

plus de 9 ans il y a

A résolu


Find the largest value in the 3D matrix
Given a 3D matrix, A, find the largest value. E.g. >> A = 1:9; >> A=reshape(A,[3 1 3]); >> islargest(A) ans = 9

plus de 9 ans il y a

A résolu


Indexing the array: Moving values
Assume sampleReadings always contains three elements. * Shift the array contents one position to the left. * The rightmost ...

plus de 9 ans il y a

A résolu


Back to basics 15 - classes
Covering some basic topics I haven't seen elsewhere on Cody. Return the class of the input variable.

plus de 9 ans il y a

A résolu


Try 1.5.4: Celsius to Fahrenheit
Write a program to convert an input given in Celsius to Fahrenheit. Examples: Input celsiusValue = 100 Output fahrValu...

plus de 9 ans il y a

A résolu


Back to basics 7 - Equal NaNs
Covering some basic topics I haven't seen elsewhere on Cody. Given 2 input variables, output true if they are equal, false ot...

plus de 9 ans il y a

A résolu


Concatenating arrays
* Assign studentIDs with concatenated row arrays groupA and groupB

plus de 9 ans il y a

Charger plus