Gelöst


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

etwa 10 Jahre vor

Gelöst


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

etwa 10 Jahre vor

Gelöst


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

etwa 10 Jahre vor

Gelöst


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

etwa 10 Jahre vor

Gelöst


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

etwa 10 Jahre vor

Gelöst


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

etwa 10 Jahre vor

Gelöst


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

etwa 10 Jahre vor

Gelöst


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

etwa 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Mehr laden