Gelöst


Matrix convolution
A certain convolution step involves an elementwise multipication between two 3x3 matrices and taking the resulting sum of the el...

etwa 5 Jahre vor

Gelöst


Matrix Indexing
Given a matrix A and scalars r,c,i, find the product of two elements, with the first element located at row r and column c (doub...

etwa 5 Jahre vor

Gelöst


Row operations
Given a matrix A and scalars m and n, add the mth row to the nth row. You can assume that the values of m and n are reasonable. ...

etwa 5 Jahre vor

Gelöst


Switch two elements in vector
Exchange the elements in the mth and nth positions in a given vector v. Thus, if m = 1, n= 4 and v = [23 1 4 5 10], then the res...

etwa 5 Jahre vor

Gelöst


Stacking vectors into a matrix
Given a 4x1 vector a, and a 2x2 matrix b, create a matrix M in which the first 2 rows are each identical to a and the last two r...

etwa 5 Jahre vor

Gelöst


Vector creation using colon operator
Create a vector y containing n uniformly spaced values between a and b, with a < b. Use the colon (:) operator.

etwa 5 Jahre vor

Gelöst


Vector creation using linspace
Create a vector y containing n uniformly spaced values between a and b, with a < b. Use linspace.

etwa 5 Jahre vor

Gelöst


Logarithmically spaced vector creation using logspace
Create a vector y containing n logarithmically spaced values between a and b, with a < b. Use the logspace operator.

etwa 5 Jahre vor

Gelöst


Logarithmically spaced vector creation using linspace
Create a vector y containing n logarithmically spaced values between a and b, with a < b. Avoid using logspace and use the linsp...

etwa 5 Jahre vor

Gelöst


Right shift an array n times with constant space.
Right shift an array n times with constant space, that is, no extra array can be used. Right shift operation: Last element com...

etwa 5 Jahre vor

Gelöst


Function - Cylinder Surface Area
The goal

etwa 5 Jahre vor

Gelöst


Determine the average number of rounds for the following game.
Each round a uniformly distributed random number is picked between 0 and 1. The game ends when the sum of the random numbers is ...

etwa 5 Jahre vor

Gelöst


preventing a war!!
essume you are a student and your family paid a lot of money for your classes but unfortunately the online classes made you a ...

etwa 5 Jahre vor

Gelöst


Find the smallest integer m such that n divides m!
Write a function that takes an integer and finds the smallest integer whose factorial is divisible by . For example, if , then...

etwa 5 Jahre vor

Gelöst


Find the number of days in a given year
Given a year number (eg. 2000) as input, find how many days are there in the given year.

etwa 5 Jahre vor

Gelöst


Who am I ?
Who am I ? Write any function that reveals itself under these constraints. Hint: I am combinatorial code, and I don't like stat...

etwa 5 Jahre vor

Gelöst


Find the sum of the following series
A(n)=(n*(n-1)!)/(n-2)!

etwa 5 Jahre vor

Gelöst


Solve an ODE: equation C
Write a function to solve the following ordinary differential equation: with and . The parameter is a constant. The functi...

etwa 5 Jahre vor

Gelöst


Count unique orderings of vertices of a polygon
Cody Problem 2671 asks us to determine whether four points can be the corners of a rectangle. The points are not necessarily inp...

etwa 5 Jahre vor

Gelöst


Sum the elements in rows of the Levine triangle
The Levine triangle starts as follows: Row 0: 2 Row 1: 1 1 Row 2: 1 2 Row 3: 1 1 2 To construct each row, r...

etwa 5 Jahre vor

Gelöst


Determine when snow started
R.P. Agnew posed the following problem: It starts snowing in the morning and continues steadily throughout the day. A snowplow t...

etwa 5 Jahre vor

Gelöst


Eliminate redundant numbers in text
Occasionally someone might write text such as Briefly explain one (1) common problem that can result from the constant use of ...

etwa 5 Jahre vor

Gelöst


Solve an ODE: equation B

etwa 5 Jahre vor

Gelöst


List the titles of Cody problems

etwa 5 Jahre vor

Gelöst


Restricted Subtraction v1
This problem is <https://www.mathworks.com/matlabcentral/cody/problems/45265-restricted-addition-v4 Restricted Addition v4> with...

etwa 5 Jahre vor

Mehr laden