Risolto


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

circa un mese fa

Risolto


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

circa un mese fa

Risolto


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

circa un mese fa

Risolto


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

circa un mese fa

Risolto


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

circa un mese fa

Risolto


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

circa un mese fa

Risolto


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

circa un mese fa

Risolto


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

circa un mese fa

Risolto


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

circa un mese fa

Risolto


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

circa un mese fa

Risolto


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

circa un mese fa

Risolto


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

circa un mese fa

Risolto


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

circa un mese fa

Risolto


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

circa un mese fa

Risolto


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

circa un mese fa

Risolto


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

circa un mese fa

Risolto


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

circa un mese fa

Risolto


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

circa un mese fa

Risolto


Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

circa un mese fa

Risolto


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

circa un mese fa

Risolto


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

circa un mese fa

Risolto


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

circa un mese fa

Risolto


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

circa un mese fa

Risolto


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

circa un mese fa

Risolto


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

circa un mese fa

Risolto


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

circa un mese fa

Risolto


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

circa un mese fa

Risolto


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]

circa un mese fa

Risolto


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

circa un mese fa

Risolto


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

circa un mese fa

Carica altro