Solved


Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.

11 years ago

Solved


Mode
Find the mode of the vector Assumption: no vector is bimodal Example 1: input=[1 2 3 4 4]; output=4 Example 2: input=[7...

11 years ago

Solved


Back to basics 2 - Function Path
Covering some basic topics I haven't seen elsewhere on Cody. Given a string that is the name of a MATLAB function, return a s...

11 years ago

Solved


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

11 years ago

Solved


Tricky timing
Write a function that takes between 0.5 seconds and 0.6 seconds to run.

11 years ago

Solved


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

11 years ago

Solved


Area of a rectangle
Find the area of a rectangle with sides a and b

11 years ago

Solved


times 5
Given the variable x as your input, multiply it by five and put the result in y.

11 years ago

Solved


Declaring a character
* Assign middleInitial with the character T.

11 years ago

Solved


Help the Patriots get to the Super Bowl
Given a football by the Patriots, return it to them with 2 psi less air in it. (The original psi is passed as a number to the...

11 years ago

Solved


Test if a matrix is symmetric
Write a logical function that returns 1 if the input matrix is symmetric and 0 otherwise.

11 years ago

Solved


prime test
find largest 2 digit prime number

11 years ago

Solved


Box!
Given a box, find the volume of the cube. With each side = a.

11 years ago

Solved


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

11 years ago

Solved


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

11 years ago

Solved


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

11 years ago

Solved


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

11 years ago

Solved


Add 7
Given an input variable x, output a variable y that is 7 greater than x. Example: Input x = 1 Output y is 8 Input ...

11 years ago

Solved


Write an expression
Assigns finalResult with firstSample plus secondSample, squared, then divided by 3. Ex: If firstSample is 18 and secondSample is...

11 years ago

Solved


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

11 years ago

Solved


Assigning a sum
* Write a statement that assigns numCoins with numNickels + numDimes.

11 years ago

Solved


Logic variables
* Assign isAvailable with true.

11 years ago

Solved


Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

11 years ago

Solved


Finding an element in a vector
x is a vector of unknown length your function should return the index of the first element in the vector that is greater than...

11 years ago

Solved


Matlab Basics II - 3 Dimensional Arrays
Assume x is a 3D array with n pages, representing students in a class, for each student (page in the array, the 3rd dimension), ...

11 years ago

Solved


Matlab Basics II - Find the roots of a function
Write a function that finds where a curve crosses zero (the x-axis) to two decimal places Example: <<http://s14.postimg.o...

11 years ago

Solved


Matlab Basics II - Determine if an array has a 3rd dimension
For an array A, determine whether it has 3 dimensions, return 0 if x is only 2D, and 1 if x is 3D

11 years ago

Solved


Matlab Basics II - Unit Conversion
Write a function that converts Kg to lbs, returns the answer to the nearest 1/100th of a pound

11 years ago

Solved


Replace every 3rd element in a vector with 4
x is a vector of undetermined length You are to replace every 3rd element with the number 4, example: x = [11 23 34 43 2 3...

11 years ago

Solved


Matlab Basics II - Max & Index of Max
Write a function that takes a vector x, then returns both the max value in x and its location in the vector for example x ...

11 years ago

Load more