Gelöst


UICBioE240 problem 1.1
Remove the middle row from a matrix, assuming # of rows is odd. So if A = [ 1 2 3; 4 5 6; 7 8 9] the...

etwa 9 Jahre vor

Gelöst


MATLAB Basic: rounding
Do rounding near to zero Example: -8.8, answer -8 +8.1 answer 8

etwa 9 Jahre vor

Gelöst


angle in regular polygon
Make a function which returns measure of interior angle in x-side regular polygon. x is as input. Please pay attention, that 1 ...

etwa 9 Jahre vor

Gelöst


MATLAB Basic: rounding II
Do rounding nearest integer. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 9

etwa 9 Jahre vor

Gelöst


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...

etwa 9 Jahre vor

Gelöst


Fibonacci-Sum of Squares
Given the Fibonacci sequence defined by the following recursive relation, * F_n = F_(n-1) + F_(n-2) * where F_0 = 0 and F_1 ...

etwa 9 Jahre vor

Gelöst


Calculate the nth Fibonacci number USING 'Golden Ratio' concept
f = [1 1 2 3 5 8 13 ...] If n=6, f(6)=8

etwa 9 Jahre vor

Gelöst


Convert Two Character String into a Binary Vector
Given a string "XOXXO" convert it into a binary vector. [1 0 1 1 0] Paul Berglund implemented an optimal method in <http://ww...

etwa 9 Jahre vor

Gelöst


metre to feet converter
The idea is to make a converter, which exchange meters to feets. We use a factor of 1m = 3.281*1f. so 3m are equals to 9.843 m...

etwa 9 Jahre vor

Gelöst


Power supply: 230V to 115V
The problem is simple: we have a wall outlet which supplies 230V and an apparatus that requires 115V. Software is always chea...

etwa 9 Jahre vor

Gelöst


More luck than brains
Give a random function that guess and return numbers from 1 to 6 exactly like the test suite .

etwa 9 Jahre vor

Gelöst


Removing rows from a matrix is easy - but what about inserting rows?
Assume A is a 5-by-5 matrix. A([2,4],:) = [] is a quick way to remove rows 2 and 4. Can you find a quick way to insert rows into...

etwa 9 Jahre vor

Gelöst


Operate on matrices of unequal, yet similar, size
You may want to add a vector to a matrix, implying that the vector is added to each column of the matrix. Or multiply a 3x4x5 ma...

etwa 9 Jahre vor

Gelöst


Is the paranthesis sequence balanced ?
Quantum mechanics and computer science are interested in <http://en.wikipedia.org/wiki/Bra%E2%80%93ket_notation bra-kets>. Today...

etwa 9 Jahre vor

Gelöst


Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

etwa 9 Jahre vor

Gelöst


Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

etwa 9 Jahre vor

Gelöst


Cody Computer Part 4 : Are you a morning Cody player Addicted ?
This is a stupid Cody challenge. You just have to *click "Submit" between 7 and 9 AM.* ... Greenwich Mean Time (GMT). To see ...

etwa 9 Jahre vor

Gelöst


Solve Linear equations
Solve Linear equations Example: x+y=2 and x+2y=3, then x and y equal to 1.

etwa 9 Jahre vor

Gelöst


Calculate the integral of the polynomial
for e.g. in = [3 2 1] out = [1 1 1 0]

etwa 9 Jahre vor

Gelöst


CARDS PROBLEM
Read my mind and tell me the card number that I have now in my hands.

etwa 9 Jahre vor

Gelöst


Bruh
Return 'bruh'.

etwa 9 Jahre vor

Gelöst


Center of mass
Given a matrix M(m,n), where m is the number of vertices of the geometrical element and n is 2 or 3 (2D-plane figure or 3D-solid...

etwa 9 Jahre vor

Gelöst


Change the first and last diagonal element of the identity matrix to zero
Starting with the identity matrix, change first and last diagonal element to zero. Example If n=5 A = 0 0 ...

etwa 9 Jahre vor

Gelöst


Largest Prime Number
Given a matrix X, find the largest prime number in X.

etwa 9 Jahre vor

Gelöst


Small Riddle
Mr. Smith has two children. If the older child is a boy, what are the odds that the other child is also a boy?

etwa 9 Jahre vor

Gelöst


Spiral Matrix
for a given integer n>=3, generate a matrix of nxn such that the value n^2 is at bottom left and its decreasing towards center ...

etwa 9 Jahre vor

Gelöst


Community Problem 500!
In honor of this being the 500th Community problem, see if you can create a function that has a Cody size of 500. It can do any...

etwa 9 Jahre vor

Gelöst


Rotate Matrix @180 degree
Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...

etwa 9 Jahre vor

Gelöst


Permute diagonal and antidiagonal
Permute diagonal and antidiagonal For example [1 2 3;4 5 6;7 8 9] -> [3 2 1;4 5 6;9 8 7] WITHOUT diag function (and variable n...

etwa 9 Jahre vor

Gelöst


ascii value
let input='a' output=97

etwa 9 Jahre vor

Mehr laden