Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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]

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


Your favourite city!
Type your favourite city.

mehr als 5 Jahre vor

Gelöst


Radians to Degrees
Convert radians to degrees.

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


ASCii Code
Using Matlab get the ASCii for '?'

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Mehr laden