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...
UICBioE240 problem 1.8
Given a list of grades in a class, write a script that gives the 2nd highest grade in the class and the average for the class.
...
6年弱 前
解決済み
UICBioE240 2.3
Make a 4D matrix of 4x4x3x4 containing all zeros.
6年弱 前
解決済み
Volume of this donut
Given hole diameter a, and outermost diameter b, determine the volume y of the resulting donut.
Find maximum value of a curve
Two vectors shall be already defined:
- Input vector x (e.g. x = 0:1:10)
- Result vector y (e.g. y = sin(x))
Create a n...
6年弱 前
解決済み
sum all digits
input = 123456789, output = 1+2+3+4+5+6+7+8+9 = 45
Replace all odd numbers with NaN
Replace all odd numbers in the vector or matrix with NaN. For example, if
x = [1 3 4 5 8 11];
then return
y = [NaN Na...
How to subtract?
*± ± ± ± ± ± ± ± ± ± ±*
* Imagine you need to subtract one...
6年弱 前
解決済み
Basics - not so easy division
Please make a function whcih divides x/y, but pay attention for some exceptions with NaN,0,Inf. Sometimes return "ERROR" instead...
6年弱 前
解決済み
Reverse Calculator
Use this reverse calculator and give correct output
Its simple, In my Reverse calculator if you press 0 it will be considered...
6年弱 前
解決済み
Evened up (or not)
You will be provided with an array or matrix that contains various numbers, in addition to an evening variable, e, set to 1 or 0...
6年弱 前
解決済み
Perl 2: pop
_This is part of a series of perl function which were very helpful for many perl programmers. Could you implement it in Matlab?_...
Low level NaN
* I have a dataset. Columns represents different variables.
* A variable may start with NaN or any double type number.
* If i...
6年弱 前
解決済み
Find the biggest digit in a matrix
Write a function to find the biggest digit in a matrix;
input -> a matrix
output -> a digit
For example;
[12; 47;...