The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".
4 years ago
Solved
2 b | ~ 2 b
Given a string input, output true if there are 2 b's in it, false if otherwise
Examples:
'Macbeth' -> false
'Publius Cor...
4 years ago
Solved
Convert a vector into numbers
Suppose a vector x = [ 1 2 4 7] is given. You have to convert this vector into string number y = '1247'.
Examples
x = [ 1...
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...
4 years ago
Solved
Total resistance of resistors in series
What is the total resistance of a number of resistors in series?
A vector R contains the resistances (in Ohm) of n resistors, w...
4 years ago
Solved
Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...
4 years ago
Solved
03 - Matrix Variables 4
Make the following variable:
<<http://samle.dk/STTBDP/Assignment1_3d.png>>
A 3x4 NaN (Not a Number) matrix
(Hint: use ...
4 years ago
Solved
Remove DC
Input x is the sampled signal vector, may have both AC and DC components. Output y should not contain any DC component.
Examp...
4 years ago
Solved
01 - Scalar variables
Create the following variables:
<<http://samle.dk/STTBDP/Assignment1_1.png>>