Solved


Find max
Find the maximum value of a given vector or matrix.

8 months ago

Solved


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

8 months ago

Solved


Inner product of two vectors
Find the inner product of two vectors.

8 months ago

Solved


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

8 months ago

Solved


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

8 months ago

Solved


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

8 months ago

Solved


Reproduce this plot!
Write a function that will take a dataset (x,y), a best fit model (model), and the upper and lower prediction bounds (lb,ub) for...

8 months ago

Solved


Solve a System of Linear Equations
Example: If a system of linear equations in x₁ and x₂ is: 2x₁ + x₂ = 2 x₁ - 4 x₂ = 3 Then the coefficient matrix (A) is: 2 ...

8 months ago

Solved


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Input...

8 months ago

Solved


Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

8 months ago

Solved


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

8 months ago

Solved


Create a figure and plot data
Given two data vectors (x,y), open a new figure and plot the data. Return the figure handle.

8 months ago

Solved


Plotting Practice
Plot cos(x) vs x as shown in the figure below. Include the appropriate title, x-label, and y-label. Note, it is case sensitive. ...

8 months ago

Solved


Sieve of Eratosthenes - 02
"Sift the Two's and Sift the Three's, The Sieve of Eratosthenes. When the multiples sublime, The numbers that remain a...

8 months ago

Solved


Travelling Salesman Problem (TSP)
Find a short way through given points. This is the travelling salesman problem. But the solution should be a fast and small func...

8 months ago

Solved


Parcel Routing
Given a matrix that represent the distance along highways between major cities numbered 1 to _N_, provide the path and shortest ...

8 months ago

Solved


Count the Number of Directed Cycles in a Graph
Given an asymmetric adjacency matrix, determine the number of unique directed cycles. For example, the graph represented by adj...

8 months ago

Solved


Graph Algorithms 3: Number of Connected Components
Given an adjacency matrix of a simple undirected graph, find the number of connected components.

8 months ago

Solved


FloydWarshall
Our task is to find shortest paths between every pair of nodes. Floyd-Warshall is a graph algorithm for finding shortest paths i...

8 months ago

Solved


Determine connected components of a graph
Adjacency matrix of an undirected graph is given. Return the number of connected components in the graph.

8 months ago

Solved


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

8 months ago

Solved


The Case of the Missing Prototype – Identify the Thief by Comparing Suspects’ Evidence and Alibi Scores
After gathering fingerprints, alibis, sensor data, and digital clues, it’s time to pinpoint the thief. You have a struct array ...

8 months ago

Solved


The Case of the Missing Prototype – Extract the Culprit’s Name from a Mixed Letter-and-Number Email Message
While tracing the suspect’s digital footprint, you recover an email containing a mixed string of letters and numbers.The letters...

8 months ago

Solved


The Case of the Missing Prototype – Calculate the Car’s Average Speed Between GPS Readings to Trace the Escape Route
Using GPS data, you’ve obtained the total distance (in meters) traveled by the suspect’s car at equal time intervals.These readi...

8 months ago

Solved


The Case of the Missing Prototype – Detect Tampered Sensor Readings from the Stolen Device’s Data Logs
You’ve recovered partial sensor data from the stolen prototype.Each reading is stored in a numeric vector data, but something se...

8 months ago

Solved


The Case of the Missing Prototype – Check for Overlapping Alibis Between Suspects to Spot Inconsistencies
Each suspect in the case has provided an alibi — a time interval [start end] representing when they claim to have been elsewhere...

8 months ago

Solved


The Case of the Missing Prototype – Restore the Correct Frame Order from the Corrupted Security Camera Footage
You’ve finally recovered the security camera footage from the Innovation Lab,but the system malfunctioned and stored frames in t...

8 months ago

Solved


The Case of the Missing Prototype – Match the Footprints Found in the Lab to the Suspects’ Shoe Sizes
The dust on the Innovation Lab floor reveals several footprints.You’ve measured their shoe sizes and noted them in a vector size...

8 months ago

Solved


The Case of the Missing Prototype – Decode the Secret Note Found on the Desk to Reveal a Hidden Message
On the lab desk, you discover a short note filled with strange letters. After examining it, you realize it’s written in a Caesa...

8 months ago

Solved


The Case of the Missing Prototype – Check the Lab’s Logbook for Suspicious Late-Night Entries
After counting the fingerprints, you turn your attention to the security logbook.It records the entry hours (from 0 to 23) of ev...

8 months ago

Load more