Resuelto


Duplicate a character
Duplicate a character 'n' times. Example 1: str='a' n=5 output='aaaaa' Example 2: str='*' n=3 output='***'

casi 11 años hace

Resuelto


Reverse a matrix
Its simple. You have to reverse a given matrix.

casi 11 años hace

Resuelto


Related Vectors
I have two vectors A & B. If the values in vector A is zero then the corresponding value in vector B should be zero. Example:...

casi 11 años hace

Resuelto


Determine the square root
Determine the square root of the value the user has entered, n.

casi 11 años hace

Resuelto


Find the dimensions of a matrix
Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


Declaring a character
* Assign middleInitial with the character T.

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


prime test
find largest 2 digit prime number

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


Logic variables
* Assign isAvailable with true.

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Cargar más