Resuelto


The Five Infection (Boss Level)
Given a 3x3 matrix A, replace: every value that is equal to five every value that is directly adjacent to a five with zero in...

13 días hace

Resuelto


Fives Begone
Given any sentence as an input value 'sentence', turn all fives into the letter X and return the improved sentence. Also, turn a...

13 días hace

Resuelto


Broken Clock
Create a function that outputs t, an inputted matrix time x, in hours and minutes (hr:min) unless the time contains a five. In t...

13 días hace

Resuelto


No Fives Permitted
Create a function that gives users an custom error message if the matrix A contains a five. The error message should say "No Fiv...

13 días hace

Resuelto


A Fiveless Factorial
Given a positive integer x, compute its factorial y, but exclude any muliplication by five if applicable.

13 días hace

Resuelto


Don't Sum a Five
Create a function that sums the first and last element of a muti-element vector unless the value of one of the elements is 5. Do...

13 días hace

Resuelto


Don't Include a Five (Part Two)
Given a vector A with at least one non-five, return vector B, with all fives excluded (not replaced by zeros).

13 días hace

Resuelto


Don't Include a Five
Given a vector A, return vector B with all 5s replaced with 0s.

13 días hace

Resuelto


High Five!
Write a function that takes a number x and returns y = 'High Five' if x is not equal to five. Return y = 'Denied' if the number ...

13 días hace

Resuelto


A Five Introduction
Write a function that takes a number x as an input and returns the same value as y, unless x = 5, in which case the function sho...

13 días hace

Resuelto


Calculate Inner Product
Given two input matrices, x and y, check if their inner dimensions match. If they match, create an output variable z which cont...

13 días hace

Resuelto


What's size of TV?
Many people buy TV. Usually they ask about diagonal. But also important are width and height. Let's assume that all TV have rati...

13 días hace

Resuelto


Counting down
Create a vector that counts from 450 to 200 in increments of 10.

13 días hace

Resuelto


Rotate Matrix @180 degree
Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...

13 días hace

Resuelto


Count up then down
Create a function that produces counting up from 0 up to n then down to 0 n=2 --> 0 1 2 1 0 n=3 --> ...

13 días hace

Resuelto


Create a square matrix of multiples
Given an input, N, output a matrix N x N with each row containing multiples of the first element of each row. This also applies...

13 días hace

Resuelto


Array of Ones
Create a 100 X 100 array of ones.

13 días hace

Resuelto


given 3 sides, find area of this triangle
1:3 -> 0; 3:5 -> 6

13 días hace

Resuelto


Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

13 días hace

Resuelto


Calculate Amount of Cake Frosting
Given two input variables r and h, which stand for the radius and height of a cake, calculate the surface area of the cake you n...

13 días hace

Resuelto


reverse string
input='rama' output='amar'

13 días hace

Resuelto


Kinetic Energy
Given the mass m and velocity v of an object, determine its <http://en.wikipedia.org/wiki/Kinetic_energy kinetic energy>.

13 días hace

Resuelto


Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.

13 días hace

Resuelto


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

13 días hace

Resuelto


Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

13 días hace

Resuelto


Matlab Basics - Rounding I
Write a script to round x DOWN to the next lowest integer: e.g. x = 2.3 --> x = 2 also: x = 2.7 --> x = 2

13 días hace

Resuelto


Transpose
Write a MATLAB script in order to convert a random length row vector (v) into a column vector.

13 días hace

Resuelto


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]

13 días hace

Resuelto


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

13 días hace

Resuelto


square root
Find the square root (y) of an input (x).

13 días hace

Cargar más