A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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.

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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.

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


UICBioE240 problem 1.14
Solve 3^x = 17

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


UICBioE240 2.8
Convert x number of hours into seconds.

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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.

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

Charger plus