Back to basics 15 - classes
Covering some basic topics I haven't seen elsewhere on Cody.
Return the class of the input variable.
11年以上 前
解決済み
Number of 1s in a binary string
Find the number of 1s in the given binary string.
Example. If the input string is '1100101', the output is 4. If the input stri...
11年以上 前
解決済み
Find max
Find the maximum value of a given vector or matrix.
11年以上 前
解決済み
Add two numbers
Calculate the sum of two numbers.
Example
input = [2 3]
output = 5
11年以上 前
解決済み
Back to basics 12 - Input Arguments
Covering some basic topics I haven't seen elsewhere on Cody.
Return a value equal to the number of input arguments to the fun...
11年以上 前
解決済み
Project Euler: Problem 10, Sum of Primes
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.
Find the sum of all the primes below the input, N.
Thank you <http:/...
Replace Vector Elements
Replace all elements in a vector which are equal to or smaller than zero with 0.1.
Example:
A = [1 2 3 -1 0 2 -3 -80];
...
11年以上 前
解決済み
Replace May with April
For instance, if the input is
input_str = 'The flowers may bloom in April';
then the output is
output_str = 'The flo...
11年以上 前
解決済み
Back to basics 15 - Benchmark
Covering some basic topics I haven't seen elsewhere on Cody.
Return an array of the benchmark values for MATLAB.
11年以上 前
解決済み
Try 1.5.4: Celsius to Fahrenheit
Write a program to convert an input given in Celsius to Fahrenheit.
Examples:
Input celsiusValue = 100
Output fahrValu...
11年以上 前
解決済み
Quote Doubler
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...