已解决


Spot the outlier
All points except for one lie on a line. Which one is the outlier? Example: You are given a list of x-y pairs in a column ...

9 years 前

已解决


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

9 years 前

已解决


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

9 years 前

已解决


Read a column of numbers and interpolate missing data
Given an input cell array of strings s, pick out the second column and turn it into a row vector of data. Missing data will be i...

9 years 前

已解决


Return area of square
Side of square=input=a Area=output=b

9 years 前

已解决


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

9 years 前

已解决


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

9 years 前

已解决


Find the palindrome
Given the string a, find the longest palindromic sub-string b. So when a = 'xkayakyy'; you should return b = 'kayak';

9 years 前

已解决


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

9 years 前

已解决


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

9 years 前

已解决


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

9 years 前

已解决


Encode Roman Numerals
Create a function taking a non-negative integer as its parameter and returning a string containing the Roman Numeral representat...

9 years 前

已解决


Count photos
Given n people, everyone must have pictures taken with everyone, each photo includes only two persons, please count the total nu...

9 years 前

已解决


Create a square matrix of multiples
Given an input, N, output a matrix N x N with each row containing multiples of the first element of each row. This also applies...

9 years 前

已解决


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

9 years 前

已解决


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

9 years 前

已解决


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

9 years 前

已解决


2 b | ~ 2 b
Given a string input, output true if there are 2 b's in it, false if otherwise Examples: 'Macbeth' -> false 'Publius Cor...

9 years 前

已解决


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

9 years 前

已解决


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

9 years 前

已解决


only input
Return the output without writing any code into the function.

9 years 前

已解决


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

9 years 前

已解决


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

9 years 前

已解决


Logic array: Identifying qualifying times
Create a logic array qualifyingIndex with true for any location where the runner is male with a running time less than 8.2. Row ...

9 years 前

已解决


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

9 years 前

已解决


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

9 years 前

已解决


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

9 years 前

已解决


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

9 years 前

已解决


Tic Tac Toe FTW
Given a tic tac toe board: * 1 represents X * 0 represents empty. * -1 represents O It is X's move. If there is an imme...

9 years 前

已解决


Prime factor digits
Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...

9 years 前

加载更多