Risolto


Draw a 'X'!
Given n as input Draw a 'X' in a n-by-n matrix. example: n=3 y=[1 0 1 0 1 0 1 0 1] n=4 y=[1 0 0...

circa 6 anni fa

Risolto


count upper and lower case characters
In a given input string, count and return the number of upper and lower case characters as u and l respectively. For example:...

circa 6 anni fa

Risolto


Remove entire row and column in the matrix containing the input values
Remove the entire row and column from the matrix containing specific values. The specified value can be a scalar or a vector. Fo...

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


Solve the system of linear equations
4x - 2y +6z=8 2x + 8y +2z=4 6x + 10y +3z=0 Input is each coefficient of polynomial. For example, a=[4 ...

circa 6 anni fa

Risolto


Annoying population
Every year the number of annoying persons in the office triples Found the population, given a(0) and t

circa 6 anni fa

Risolto


Sum the elements in either diagonal of a square matrix
Sum the elements of a square matrix that lie on either the major diagonal or anti-diagonal. (Include all elements that are part ...

circa 6 anni fa

Risolto


Hard limit function
Classify x data as if x>=0 then y=1 if x<0 then y=0 Example x = [ -2 -1 0 1 2] y = [ 0 0 1 1 1]

circa 6 anni fa

Risolto


Special matrix
Make a square matrix with this shape. For n=4 M = 1 1 0 0 1 0 1 0 0 1 0 ...

circa 6 anni fa

Risolto


Approximation of Pi
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...

circa 6 anni fa

Risolto


matrix of natural number
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 resides seially as shown in the examples below. ...

circa 6 anni fa

Risolto


Multiples of a Number in a Given Range
Given an integer factor _f_ and a range defined by _xlow_ and _xhigh_ inclusive, return a vector of the multiples of _f_ that fa...

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


Cody Matlab Version
What is the current Cody Matlab Release? *Output:* string *Examples:* '(R2012a)' or 'R2012a' Hint: We have mo...

circa 6 anni fa

Risolto


Kelvin to Celsius
Degrees Celsius = degrees Kelvin - 273.15. Given a temperature in Kelvin, return the equivalent temperature in Celsius.

circa 6 anni fa

Risolto


Basic arrays operations.
Apply element-by-element binary operation 'fun' to two arrays (A and B).

circa 6 anni fa

Risolto


Your favourite city!
Type your favourite city.

circa 6 anni fa

Risolto


Radians to Degrees
Convert radians to degrees.

circa 6 anni 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 6 anni fa

Risolto


Determine given vector is even or odd
Find the numbers of the input vector is odd or even then replace even with 1 and odd with 0 Example x = [ 3 3 4 6 1] ...

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


ASCii Code
Using Matlab get the ASCii for '?'

circa 6 anni fa

Risolto


Create incrementing array
Given a and b generate an output matrix as shown in following examples: a=2 b=5 output=[2 20 200 2000 20000] a=4 b...

circa 6 anni fa

Risolto


The Dark Side of the Die
It is well-known that opposite sides of a classic hexahedral die add to 7. Given a vector of dice rolls, calculate the sum of th...

circa 6 anni fa

Risolto


Binary Coder
Take an input number and print the binary value of this number.

circa 6 anni fa

Risolto


Which quadrant?
Given a complex number, output quadrant 'I' 'II' 'III' or 'IV' | II | I | ...

circa 6 anni fa

Risolto


Volume of this donut
Given hole diameter a, and outermost diameter b, determine the volume y of the resulting donut.

circa 6 anni fa

Risolto


Remove white space from the string
Remove the white spaces (trailing and leading) from the input variable

circa 6 anni fa

Risolto


Convert from Base 10 to base 5
Convert the input number from base 10 into base 5: for example: if a(in base 10)= 5 then a(in base 5)= 10

circa 6 anni fa

Carica altro