Solved


Laws of motion 1

2 years ago

Solved


Laws of motion 2

2 years ago

Solved


Laws of motion 3

2 years ago

Solved


Laws of motion 4
Given the initial velocity 'u', final velocity 'v' and acceleration 'a', find the distance travelled.

2 years ago

Solved


Laws of motion 5

2 years ago

Solved


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

2 years ago

Solved


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

2 years ago

Solved


Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

2 years ago

Solved


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

2 years ago

Solved


Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

2 years ago

Solved


Dimensions of a rectangle
The longer side of a rectangle is three times the length of the shorter side. If the length of the diagonal is x, find the width...

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

2 years ago

Solved


y equals x divided by 2
function y = x/2

2 years ago

Solved


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

2 years ago

Solved


multiply by three
Given the variable x as your input, multiply it by 3 and put the result equal to y. Examples: Input x = 2 Output y is ...

2 years ago

Solved


Program an exclusive OR operation with logical operators
Program an exclusive or operation *without* using the MATLAB function xor. Use logical operators like |, &, ~, ... instead. ...

2 years ago

Solved


A matrix of introverts
You are given a matrix full of numbers who happen to be very shy. Write a MATLAB function that will put a square of zeros aroun...

2 years ago

Solved


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

2 years ago

Solved


Perimeter of a semicircle
Given the diameter d, find the perimeter of a semicircle

2 years ago

Solved


BaeIsAlwaysRight
Output yes whatever bae says

2 years ago

Solved


Display negative numbers
Given array,x, display all the negative numbers and display output as y. Example x=[1 -2 3 -4] , output is y=[-2 -4].

2 years ago

Solved


Annoying population
Every year the number of annoying persons in the office triples Found the population, given a(0) and t

2 years ago

Solved


Create a code for XNOR
Given two inputs, output XNOR of those two

2 years ago

Solved


Create tangent function out of sine function only
Please don't use cosine and tangent functions

2 years ago

Solved


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

2 years ago

Solved


Linear system of equations
Solve the system of equations in three variables.

2 years ago

Solved


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

2 years ago

Solved


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

2 years ago

Solved


The Piggy Bank Problem
Given a cylindrical piggy bank with radius g and height y, return the bank's volume. [ g is first input argument.] Bonus though...

2 years ago

Solved


Total energy

2 years ago

Load more