Solved


Determine Matrix Dimensions Without Using some built-in MATLAB functions, version 2
Write a function that takes a 2D matrix/1D vector x as input and returns a row vector containing the number of rows and the numb...

1 month ago

Solved


Sum all elements of a vector or matrix without using sum()
Write a function that computes the sum of all elements of the input array v without using the built-in sum function. The input ...

1 month ago

Solved


Determine Matrix Dimensions Without Using some built-in MATLAB functions
Write a function that takes a 2D matrix/1D vector x as input and returns a row vector containing the number of rows and the numb...

1 month ago

Solved


Determine Matrix Dimensions Without Using size or length
Write a function that takes a matrix A as input and returns a row vector containing the number of rows and the number of columns...

1 month ago

Solved


Built-out FFTShift
The task in hand is to replicate the built-in function - fftshift (with single input), but without using the function. However,...

1 month ago

Solved


Find nth triangular number.
Calculate the triangular number of given integer n.

1 month ago

Solved


Jump Game
You are given an array of non-negative integers `nums`. You are initially positioned at the first index of the array, and each e...

1 month ago

Solved


Leo Bậc Thang
Bạn đang leo cầu thang. Cần n bước để lên đến đỉnh. Mỗi lần bạn có thể leo 1 hoặc 2 bước. Hỏi có bao nhiêu cách khác nhau để le...

1 month ago

Solved


Find record values in a sequence
Write a function to find the record values in a sequence—that is, the largest values seen since the start. For example, if the s...

1 month ago

Solved


Find Solutions to Edge-Matching Puzzles
I was intrigued by some edge-matching puzzles I came across when visiting my parents over Thanksgiving. "An edge-matching puzzle...

1 month ago

Solved


How tall will my cactus be?
My Barbed Wire Cactus is a desert cactus that relies on just the right amount of rainfall to stay healthy. Given a 1×12 vector...

1 month ago

Solved


Express base-10 integers in lazy binary
The binary (or base-2) representations of a number n can be constructed as follows: Step 1: If n = 0, then the binary represent...

1 month ago

Solved


Compute MOSFET oxide thickness
Calculate the oxide thickness in nanometers for an NMOS on a p-type substrate. Inputs (all scalars): NA — acceptor concentrat...

1 month ago

Solved


5-year Annedversaries
This is the Bonus Round problem for the 2025 Cody Contest. Attend the watch party on Friday, March 27 to see how 6 champions fro...

1 month ago

Solved


Find the Nth number in the 4-sequence
Find the Nth number in the 4-sequence. 4, 8, 12, 16, 24, 28, 32, 36, 44 ... Hint: Refer test suites

1 month ago

Solved


Find the Nth number in the 3-sequence
Find the Nth number in the 3-sequence. 3, 6, 9, 12, 15, 18, 21, 24, 27, 33 ... Hint: Refer test suites

1 month ago

Solved


Find the Nth number in the 2-sequence.
Find the Nth number in the sequence. 2, 4, 6, 8, 12, 14, 16, 18, 22, ... Hint: Refer test suites

1 month ago

Solved


A Fiveless Factorial
Given a positive integer x, compute its factorial y, but exclude any muliplication by five if applicable.

1 month ago

Solved


Solve for factorial of X
It gives you the number x, and set y equal to x factorial. Ex. There are 52 cards in a deck, each specific order of all 52 car...

1 month ago

Solved


Return the Square of a Number
Write a function that takes a single numeric input x and returns its square. That is, given x, your function should output x^2....

1 month ago

Solved


Calculate Reynolds Number
Write a MATLAB function that calculates the Reynolds number for flow over a flat plate: ​ ρ = fluid density (kg/m³) V = veloc...

1 month ago

Solved


Compute Airspeed from Mach Number
Write a MATLAB function that converts a Mach number to airspeed given the speed of sound aa in m/s: V=M⋅a V = airspeed (m/s) M...

1 month ago

Solved


Calculate Drag Force
Write a MATLAB function to compute the drag force on an object moving through air: ​ where: D is drag force (N) ρ is air de...

1 month ago

Solved


Calculate Lift Force on an Airfoil
Write a MATLAB function to calculate the lift force acting on an airfoil given the air density, wing area, velocity of the airfl...

1 month ago

Solved


Count the Even Digits in a Number
Given a positive integer n, write a function that returns how many digits of n are even. Even digits are: 0, 2, 4, 6, 8

1 month ago

Solved


Mandelbrot Set Generator Class
Create a class Mandelbrot that computes the Mandelbrot set on a given complex plane window. The Mandelbrot set is defined by it...

1 month ago

Solved


Enclosure Matrix
The problem gives you a positive integer n. You need to create a matrix consisting of n layers of natural numbers; the outermost...

1 month ago

Solved


Determine when iterations of phi(psi(x)) repeat
Cody Problem 656 introduced the Euler totient function , which counts the number of integers smaller than that are relatively...

1 month ago

Solved


Compute the Dedekind psi function
Write a function to compute the Dedekind psi function. The values for n = 1, 2, 3, 4, 5, and 6 are 1, 3, 4, 6, 6, and 12.

1 month ago

Solved


Barnes G-Function
Evaluate the Barnes G-Function at a given (integral) value. %Example 1 in = 1; out = 1; %Example 1 in = 4; out = 2; ...

1 month ago

Load more