Solved


Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

4 years ago

Solved


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

4 years ago

Solved


Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

4 years ago

Solved


Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

4 years ago

Solved


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

4 years ago

Solved


Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

4 years ago

Solved


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

4 years 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];

4 years ago

Solved


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

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

4 years ago

Solved


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

4 years ago

Solved


Simple equation: Annual salary
Given an hourly wage, compute an annual salary

4 years ago

Solved


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

4 years ago

Solved


Is my wife right?
Regardless of input, output the string 'yes'.

4 years ago

Solved


Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

4 years ago

Solved


Sum of odd numbers in a matrix
Find the sum of all the odd numbers in a matrix. Example x = [2 3 5 7 1 4 11] y = 27

4 years ago

Solved


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

4 years ago

Solved


Calculate the square of a number (Super Easy)
The goal is to calculate the square (y) of a number (x). Good way to start MatLab for beginners.

4 years ago

Solved


An Ohm's Law Calculator
*BACKGROUND / MOTIVATION:* Many important observations in math and science can be described by short, but powerful, equations...

4 years ago

Solved


UICBioE240 problem 1.16
sin^2(pi/6) + cos^2(pi/6)

4 years ago

Solved


UICBioE240 problem 1.14
Solve 3^x = 17

4 years ago

Solved


UICBioE240 problem 1.17
In the expression (2+5i), how does MATLAB read the expressions A = 2+5i B = 2+5*i C = both are okay Write capital letter a...

4 years ago

Solved


UICBioE240 2.10
Given a vector of numbers, give the difference between the maximum and minimum values.

4 years ago

Solved


UICBioE240 2.8
Convert x number of hours into seconds.

4 years ago

Solved


UICBioE240 2.3
Make a 4D matrix of 4x4x3x4 containing all zeros.

4 years ago

Solved


UICBioE240 2.2
Make a 3x4 matrix that contains all ones.

4 years ago

Solved


Saving MATLAB session to a file
How to save MATLAB session to a file?

4 years ago

Solved


UICBioE240 problem 1.18
exp(pi/5*i) and exp(pi/5i). Is there any difference in result? Write yes or no as a string.

4 years ago

Solved


UICBioE240 problem 1.4
So if A = [ 1 2 3; 4 5 6; 7 8 9] B = [ 3 3]

4 years ago

Solved


UICBioE240 problem 1.3
Find the length of a vector. So if A = [1 1 1 1 1] Then B = 5

4 years ago

Load more