Solved

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

10 maanden ago

Solved

Too Many Zeros, Dump Them!

Sometimes when I create a matrix, I use this syntax: a = zeros(1000,1000); But when the function ends, I find that I don'...

10 maanden ago

Solved

cross in array

Make a cross from "1" in odd size array. Other value from array should be equal to "0"; As input you get length of side of arra...

10 maanden ago

Solved

Reverse Calculator

Use this reverse calculator and give correct output Its simple, In my Reverse calculator if you press 0 it will be considered...

10 maanden ago

Solved

Next Higher Power of B

|Given a number _n_ and a base _B_ greater than 1, return the lowest integer power of _B_ that is greater than or equal to _n_. ...

10 maanden ago

Solved

Add one raw in given matrix as shown in example

*Add one raw in given matrix as shown in example* A=[1 0;0 1]; X=[3 5]; Answer must be:[1 0; 0 1;3 5]

10 maanden ago

Solved

Half-Swap

Given a vector with an even number of elements, rearrange it so that the elements in its first half are switched with those i...

10 maanden ago

Solved

Cody Matlab Version

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

10 maanden ago

Solved

Replace secondary diagonal elements of a square array

Replace all the secondary diagonal elements of the square array A with the number n Example: A = [1 2 3 4 5 6 ...

10 maanden ago

Solved

How many digits are there?

Input(s) - any string Output(n) - number of digits within string s

10 maanden ago

Solved

UICBioE240 problem 1.5

Find the size of the matrix, then multiply both values by 10 and make it into a column vector. So if A = [ 1 2 3; ...

10 maanden ago

Solved

Basic commands - Greatest common divisor

Please write a function, which, will put as output greatest common divisor. Example: A = [-5 17; 10 0];...

10 maanden ago

Solved

How to calculate log?

There is a log that have base 5. How to calculate? log5(x)?

10 maanden ago

Solved

Time Expansion

How can you slow down any discrete-time signal? Example Input original signal x. x = [1 2 3 -1 -2 -5 -4] We want t...

10 maanden ago

Solved

Number of odd and even elements within matrix

Input(m) - any matrix with integers Output(n) - n(1)=number of odd elements, n(2)=number of even elements Example: * m=...

10 maanden ago

Solved

Kelvin to Celsius

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

10 maanden ago

Solved

Delete 2nd and 5th column of Given 6*6 matrix

Delete the 2nd and 5th columns of the given 6*6 matrix. Example Suppose A = magic(6) 35 1 6 26 19 ...

10 maanden ago

Solved

Find out sum of prime number till given number

Find out sum of prime number till given number Example, if number is 10, then answer must be 17.

10 maanden ago

Solved

Happy 2013...

Happy 2013, everyone! An interesting tidbit about 2013 is that it is the first year since 1987 to contain four different digits...

10 maanden ago

Solved

Which quadrant?

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

10 maanden ago

Solved

Wrapping the Tower of Pisa

The famous artist Christo Vladimirov Javacheff, who likes pizza, wants to wrap the well-known Italian tower in paper. It is a ci...

10 maanden ago

Solved

Rotate and display numbered tile

Imagine a square tile with four numbers on it, one on each edge. We will call these edges north, east, south, and west. If th...

10 maanden ago

Solved

Additive persistence

Inspired by Problem 2008 created by Ziko. In mathematics, the persistence of a number is the *number of times* one must apply...

10 maanden ago

Solved

Vectorizing, too easy or too hard?

Please insert a . before any ^, * or / in the string. That's it!!

10 maanden ago

Solved

Count number of words in string

Count number of words in string Examples 'hi', answer is 1 'hi hi', answer is 2 'I enjoy cody', answer is 3

10 maanden ago

Solved

Given a matrix, return the last eigen value

Given a matrix, return the first eigen value For example: x = magic(5) 17 24 1 8 15 23 5 7 14 ...

10 maanden ago