Community Profile

# Sebastian

### TechCoaching GmbH

454 total contributions since 2015

View details...

Contributions in
View by

Solved

The Answer to Life, the Universe, and Everything
A variation of a previous Hitchhiker's Guide to the Galaxy problem. *Inputs:* Life, the Universe, and Everything *Output:*...

10 hours ago

Solved

Back to basics 15 - classes
Covering some basic topics I haven't seen elsewhere on Cody. Return the class of the input variable.

10 hours ago

Solved

ASCii Code
Using Matlab get the ASCii for '?'

12 hours ago

Solved

Matlab Basics - Convert a row vector to a column vector
Write a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any...

12 hours ago

Solved

Switch matrix to a column vector
for e.g. x = [1 2 3 4] y = 1 3 2 4

12 hours ago

Solved

Back to basics 19 - character types
Covering some basic topics I haven't seen elsewhere on Cody. Return the number of punctuation characters in the input variabl...

1 day ago

Solved

Count ones
Write a program to count number of ones (1s) in an integer variable input. For example: Input x=2200112231 output y=3 I...

1 day ago

Solved

Area of a Square
Inside a square is a circle with radius r. What is the area of the square?

2 days ago

Solved

Who invented zero?
We know the importance zero in computer science, mathematics... but who invented zero? Clue: He was the first in the line ...

2 days ago

Solved

Back to basics 25 - Valid variable names
Covering some basic topics I haven't seen elsewhere on Cody. Given a string, return true if it is a valid MATLAB variable nam...

2 days ago

Solved

How many days in a month?
Return the number of days in a given month in 2017. If the input is not a valid month number, return -1. Examples: Input...

2 days ago

Solved

2 days ago

Solved

Squaring Matrix
Square the following matrix using matlab % A = 1 2 3 4 5 6 7 8 So new matrix should display...

2 days ago

Solved

Find out sum of all elements of given Matrix
Find out sum of all elements of given Matrix A=[1 2 3;4 5 6 ;7 8 9]; Answer must be: 45 *If you like this problem, pl...

2 days ago

Solved

Write a code that will follow the equation y = x * (x + x) * x.
If x = 5, y = 5 * (5+5) * 5 = 250

2 days ago

Solved

How many Integers?
Count the integers in a given vector |v|. You *must* use a loop to count each element separately. Examples: Input: v...

3 days ago

Solved

Complex number
For complex number c=a+bi, write code that will add a and b together.

3 days ago

Solved

Negative matrix
Change the sign of all elements in given matrix.

3 days ago

Solved

Square Diagonal
If n is the given number, then make a diagonal matrix of size 2*2 with the square of that number.

3 days ago

Solved

03 - Matrix Variables 2
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3b.png>> A 9x9 matrix of zeros, but with the following v...

3 days ago

Solved

Mode
Find the mode of the vector Assumption: no vector is bimodal Example 1: input=[1 2 3 4 4]; output=4 Example 2: input=[7...

3 days ago

Solved

It dseon't mettar waht oedrr the lrettes in a wrod are.
An internet meme from 2003 (read more <http://www.snopes.com/language/apocryph/cambridge.asp here>) asserted that readers are re...

3 days ago

Solved

Half?
If you toss an even number (x) of coins, what is the probability (y) of 50% head and 50% tail?

3 days ago

Solved

07 - Common functions and indexing 3
Define _eMat_: <<http://samle.dk/STTBDP/Assignment1_3e.png>> Create the variable _eMat2_, which is equal to _eMat_ with th...

3 days ago

Solved

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

3 days ago

Solved

Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime nu...

3 days ago

Solved

02 - Vector Variables 2
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2b.png>>

3 days ago

Solved

Sum the numbers on the main diagonal
Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

4 days ago

Solved

"mirror" matrix
Create n x 2n "mirror" matrix of this type: Examples For n = 2 m = [ 1 2 2 1 1 2 2 1 ] For n = 3 m = ...

4 days ago

Solved

Square root of a number
Write a code that will output the square root of x.

4 days ago