Back to basics 26 - Keywords
Covering some basic topics I haven't seen elsewhere on Cody.
Return a cell array of strings of all MATLAB keywords.
5 years ago
Solved
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...
N-plicate me
Modified version of duplicate and triplicate me. Repeat elements of input vector with given input n
Ex:
input = [1 2 3 4 5...
5 years ago
Solved
Matlab Basics II - Intervals
Write a function that takes an interval from a to b, and divides it into 5 parts
example:
a = 1, b = 2
output = 1 1.25 ...
5 years ago
Solved
Matlab Basics - Logical Tests I
Write a script to test whether a year number is for a leap year or not.
eg. x = 1884
output = 1
eg. x = 3
output = 0
5 years ago
Solved
Replace values under a limit
For a vector x and number n, the goal is to find every element of x inferior to n and replace it by n.
Example
x= [ 1 2 3...