Feeds
已解决
Relative ratio of "1" in binary number
Input(n) is positive integer number Output(r) is (number of "1" in binary input) / (number of bits). Example: * n=0; r=...
1 year 前
已解决
First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero i...
1 year 前
已解决
Calculate BMI
Given a matrix hw (height and weight) with two columns, calculate BMI using these formulas: 1 kilogram = 2.2 pounds 1 inch = 2...
1 year 前
已解决
Find the sides of an isosceles triangle when given its area and height from its base to apex
Find the sides of an isosceles triangle when given its area and the height from its base to apex. For example, with A=12 and h=...
1 year 前
已解决
Make a vector of prime numbers
Input(n) - length of vector with prime numbers Output(v) - vector of prime numbers Example: * n=1; v=2 * n=3; v=[2 3 5...
1 year 前
已解决
Sum of series VI
What is the sum of the following sequence: Σk⋅k! for k=1...n for different n?
1 year 前
已解决
Back to basics 23 - Triangular matrix
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, return a matrix with all elements above a...
1 year 前
已解决
Test if two numbers have the same digits
Given two integers _x1_ and _x2_, return |true| if the numbers written with no leading zeros contain the same digits. That is, t...
1 year 前
已解决
Triangle Numbers Below N
This is an offshoot of <http://www.mathworks.com/matlabcentral/cody/problems/5-triangle-numbers Cody Problem 5: Triangle Numbers...
1 year 前
已解决
vectorization in N
For a given integer n (n>1), compute the sum f (i) (1 <= i <= n) where f (i) = 1 if n is odd and 2 otherwise.
1 year 前
已解决
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.
1 year 前
已解决
Back to basics 16 - byte order
Covering some basic topics I haven't seen elsewhere on Cody. Switch the byte order of the input (i.e. if little-endian -> big...
1 year 前
已解决
Back to basics 13 - Input variables
Covering some basic topics I haven't seen elsewhere on Cody. Return as a string the name of the input variable to the functio...
1 year 前
已解决
03 - Matrix Variables 6
Make _fMat_ be a 5x3 matrix of random integers with values from -3 to 3 (Hint: use *randi*)
1 year 前
已解决
No Twins?
Write a function that accepts as input a vector and returns the same vector, but retaining only the first occurrence of an eleme...
1 year 前
已解决
Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1
1 year 前
已解决
Find last zero for each column
Given a numeric array of arbitrary size, return the row index of the last zero for each column. If a column contains all nonzero...
1 year 前
已解决
Find the Oldest Person in a Room
Given two input vectors: * |name| - user last names * |age| - corresponding age of the person Return the name of the ol...
1 year 前
已解决
04 - Scalar Equations 1
Define the variable a: <<http://samle.dk/STTBDP/Assignment1_4-a.png>> Use this to calculate x: <<http://samle.dk/STTBD...
1 year 前
已解决
Back to basics 1 - Saving
Covering some basic topics I haven't seen elsewhere on Cody. Given an input variable 'x', save it to disk in a file named 'co...
1 year 前
已解决
Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...
1 year 前
已解决
Given a square and a circle, please decide whether the square covers more area.
You know the side of a square and the diameter of a circle, please decide whether the square covers more area.
1 year 前
已解决
Clean the List of Names
Given a list of names in a cell array, remove any duplications that result from different capitalizations of the same string. So...
1 year 前
已解决
Determine if input is odd
Given the input n, return true if n is odd or false if n is even.
1 year 前
已解决
03 - Matrix Variables 3
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3c.png>> A 10x10 matrix where the numbers from 1 to 100 ...
1 year 前
已解决
MATLAB Basic: rounding III
Do rounding towards minus infinity. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 8
1 year 前
已解决
Free passes for everyone!
_Simply return the name of the coolest numerical computation software ever_ *Extra reward* (get a _freepass_): Once a mont...
1 year 前

