Resuelto


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

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


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.

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


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.

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


UICBioE240 problem 1.14
Solve 3^x = 17

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


UICBioE240 2.8
Convert x number of hours into seconds.

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


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.

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


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

casi 4 años hace

Cargar más