解決済み


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

10年以上 前

解決済み


Compute total cost
A soda costs 2 dollars. A taco costs 3 dollars. Write a statement that assigns totalCost with the total meal cost given the numb...

10年以上 前

解決済み


Comments
* Fix the syntax errors.

10年以上 前

解決済み


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

10年以上 前

解決済み


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

10年以上 前

解決済み


Matlab Basics - Pick out parts of a vector
Consider x a vector of length >= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, a...

10年以上 前

解決済み


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

10年以上 前

解決済み


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

10年以上 前

解決済み


Matlab Basics - y as a function of x
write a script to calculate y as a function of x, such that y = 6x^2 + 5x - 2

10年以上 前

解決済み


Make a simplified barcode
Given an integer to encode, make a barcode using the following encoding scheme: * The bar code is made from the binary versio...

10年以上 前

解決済み


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

10年以上 前

解決済み


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

10年以上 前

解決済み


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

10年以上 前

解決済み


Indexing an array element
* Assign currentStudent with the second element of array testScores. _Reminder: Array indexing starts with 1._

10年以上 前

解決済み


Plus x: A first program
_Solve this problem in Mathwork's online Cody system._ Write a statement that assigns y with 5 plus x. Ex: If input x = 2,...

10年以上 前

解決済み


Circle area using pi
Write a statement that assigns circleArea with the circle's area given circleRadius. Use the built-in mathematical constant pi. ...

10年以上 前

解決済み


Count from 0 to N^M in base N.
Return an array of numbers which (effectively) count from 0 to N^M-1 in base N. The result should be returned in a matrix, with ...

10年以上 前

解決済み


Your favourite city!
Type your favourite city.

10年以上 前

解決済み


Average speed for the entire trip
The input is two speeds (for the trip and return trip) and output is average speed. Assume units are consistent, say miles per h...

10年以上 前

解決済み


Remove the positive integers.
Given array,x, remove all the positive numbers and display ouput as y. Example x=[1 -2 3 -4] , output is y=[-2 -4].

10年以上 前

解決済み


Create sequnce 1 4 9 16 25.........
Create sequnce 1 4 9 16 25......... upto entered input value using matlab scripting commands

10年以上 前

解決済み


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

10年以上 前

解決済み


Create One Large Eye of size N x N Quickly?
*<http://en.wikipedia.org/wiki/Aye_(yes) Aye !!!>*

10年以上 前

解決済み


Double colon operator: Increment by x
* Construct a row array countValues from 0 to 25, elements incremented by incrementValue. Ex: If incrementValue is 5, countVa...

10年以上 前

解決済み


Matlab Basics - Set unwated parts of a vector to zero
Consider a vector x, of length >= 7, write a script to set elements 2, 5, and 6 to zero. e.g. x = [1 2 3 4 5 6 7] --> x = [1 ...

10年以上 前

解決済み


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

10年以上 前

解決済み


Formatting currency numbers
Given a number, format it properly for textual display using the notation $xxx,xxx,xxx.xx. Assume that no more than two digits ...

10年以上 前

解決済み


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

10年以上 前

解決済み


Non-zero bits in 10^n.
Given an integer that is a power of 10, find the number of non-zero bits, k, in its binary representation. For example: * ...

10年以上 前

解決済み


Matlab Basics - Absolute Value
Write a script that returns the absolute value of the elements in x e.g. x = [-1 -2 -3 -4] --> y = [1 2 3 4]

10年以上 前

さらに読み込む