Risolto


Populating an array with a for loop
Write a for loop to populate multiplicationTable with the multiples of baseValue from 0 to 5. Ex: If baseValue is 2, then mu...

circa 10 anni fa

Risolto


Writing a function: MaxValue()
Write a local function named MaxValue that returns the maximum of two inputs numA and numB.

circa 10 anni fa

Risolto


Knight's Tour Checker
Given a matrix a, determine whether or not a legal <http://en.wikipedia.org/wiki/Knight's_tour knight's tour> is present. The kn...

circa 10 anni fa

Risolto


Number of pennies
Complete the function ConvertToPennies() so that the function returns the total number of pennies given a number of dollars and ...

circa 10 anni fa

Risolto


Finding values in arrays
Assign numMatches with the number of elements in userValues that equal matchValue. Ex: If matchValue = 2 and userVals = [2, ...

circa 10 anni fa

Risolto


Travel speed
Write an anonymous function to compute the Euclidean distance given two points (x1, y1) and (x2, y2). Use the following equation...

circa 10 anni fa

Risolto


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

circa 10 anni fa

Risolto


Determine the mean of matrix
Determine the mean of matrix without using mean function Hint: use simple algorithm

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


Matlab Basics II - Minimum
Write a function that returns the minimum of each ROW of a matrix x example: x = [1 2 3; 4 5 6]; output [1;4];

circa 10 anni fa

Risolto


Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

circa 10 anni fa

Risolto


Proper Factors
Generate the proper factors of input integer _x_ and return them in ascending order. For more information on proper factors, ref...

circa 10 anni fa

Risolto


Function call: Kilometers to miles
Assign rateMPH with the corresponding rate in miles per hour given a user defined rateKPH, which is a rate in kilometers per hou...

circa 10 anni fa

Risolto


Armstrong Number
Determine whether the given input n-digit number is Armstrong Number or not. Return True if it is an Armstrong Number. An n-D...

circa 10 anni fa

Risolto


Insect population
An insect population doubles every generation. * Write a while loop that iterates numGeneration times. * Write a statment ...

circa 10 anni fa

Risolto


Preset rpm speeds
A centrifuge has four preset speeds. Write a switch statement that assigns rpmSetting with the appropriate rpm speed given prese...

circa 10 anni fa

Risolto


Convert letters to Greek letter
Write a switch statement that checks origLetter. If origLetter is 'a' or 'A', assign greekLetter with 'Alpha'. If origLetter is ...

circa 10 anni fa

Risolto


For loops: Odds sum
Write a for loop that assigns summedValue with the sum of all odd values from 1 to userNum. Assume userNume is always greater th...

circa 10 anni fa

Risolto


For loops: Savings account
The for loop calculates the amount of money in a savings account after numberYears given an initial balace of savingsBalance and...

circa 10 anni fa

Risolto


While loop: Summation
Write a while loop that assigns summedValue with the sum of all values from 1 to userNum. Assume userNum is always greater than ...

circa 10 anni fa

Risolto


Genetic markers test
Assign testResult with 1 if either geneticMarkerA is 1 or geneticMarkerB is 1. If geneticMarkerA and geneticMarkerB are both 1, ...

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


Symmetric matrix
You must create a n-by-n *symmetric* matrix such that A(row,col) = row/col for col >= row. Example if n =3 : output is : ...

circa 10 anni fa

Risolto


Cell Counting: How Many Draws?
You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...

circa 10 anni fa

Risolto


Times 3 problem
When you enter the number, it should return the number multiplied by 3

circa 10 anni fa

Risolto


Matlab Basics II - Intervals
Write a function that takes an interval from a to b, and divides it into 5 parts example: a = 1, b = 2 output = 1 1.25 ...

circa 10 anni fa

Risolto


Matlab Basics II - Free Fall
An object freely falling from rest under gravity covers a distance x given by: x = 1/2 gt^2 write a function that calculat...

circa 10 anni fa

Risolto


Matlab Basics - Rounding III
Write a script to round a large number to the nearest 10,000 e.g. x = 12,358,466,243 --> y = 12,358,470,000

circa 10 anni fa

Risolto


Multiply by 3
Given the variable x as your input, multiply it by three and put the result in y.

circa 10 anni fa

Risolto


Calculate distance travelled when given radius and rotations
When given radius of wheel and number of rotations calculate total distance travelled consider pi=3.14

circa 10 anni fa

Carica altro