Solved


Is My Wife Wrong?
Answer the question. (see also <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right Problem 149: Is my ...

meer dan 3 jaar ago

Solved


Area of a disk
Find the area of a disk or circle. x= radius of the disk.

meer dan 3 jaar ago

Solved


Surface area of a cone

meer dan 3 jaar ago

Solved


Volume of cone

meer dan 3 jaar 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];

meer dan 3 jaar ago

Solved


Repeat elements of a vector
Repeat each elements of a given vector according to their values. * x=[1,2,1,3] * y=[1,2,2,1,3,3,3]

meer dan 3 jaar ago

Solved


leap year
find the number of leap years within the given time interval

meer dan 3 jaar ago

Solved


only input
Return the output without writing any code into the function.

meer dan 3 jaar ago

Solved


Perimeters/Circumference
Given an array. Determine whether the perimeter is of a circle, triangle or square. Then calculate the perimeter.

meer dan 3 jaar ago

Solved


Where is she?
Given the numbers 12, 3, 6, 9 Tell where the girl is located. That is: Look to your 3 o'clock = look right Example ...

meer dan 3 jaar ago

Solved


Remove the Zero
Given an array n, remove all zeros

meer dan 3 jaar ago

Solved


ZigZag - 05
Given a matrix, print all its elements in the alpha form. For example - a=[16 2 3 13 5 11 10 8 ...

meer dan 3 jaar ago

Solved


ZigZag - 01
Given a matrix, return the elements that are on the Z form of the matrix. For example - a=[1,2,3; 4,5,6; 7,8,9] ...

meer dan 3 jaar ago

Solved


Angle between two vectors
You have two vectors , determine the angle between these two vectors For example: u = [0 0 1]; v = [1 0 0]; The a...

meer dan 3 jaar ago

Solved


Are all the three given point in the same line?
In this problem the input is the coordinate of the three points in a XY plane? P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) how can...

meer dan 3 jaar ago

Solved


Volume Pillar
Calculate the volume of a pillar with radius l and heigth ar.

meer dan 3 jaar ago

Solved


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

meer dan 3 jaar ago

Solved


Matrix to column conversion
Given a matrix of any size, convert it into a column vector. e.g A=[10 20 30; 40 50 60] then, B = [10; 40; ...

meer dan 3 jaar ago

Solved


Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

meer dan 3 jaar ago

Solved


Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

meer dan 3 jaar ago

Solved


Arrange vector in ascending order
Arrange a given vector in ascending order. input = [4 5 1 2 9]; output = [1 2 4 5 9];

meer dan 3 jaar ago

Solved


0, 2, 0, -2, 0, 2, 0, -2, ...
Generate the first n terms of a periodic sequence defined as f(x) = 0, 2, 0, -2, 0, 2, 0, -2, ..., for x = 1, 2, 3, 4, 5, 6...

meer dan 3 jaar ago

Solved


Make a 1 hot vector
Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...

meer dan 3 jaar ago

Solved


Celsius to Kelvin
Convert Celsius degrees to Kelvin temperature.

meer dan 3 jaar ago

Solved


Create a square matrix of multiples
Given an input, N, output a matrix N x N with each row containing multiples of the first element of each row. This also applies...

meer dan 3 jaar ago

Solved


Compute Fibonacci Number
Compute the _n_-th Fibonacci Number f(0) = 0, f(1) = 1, f(2) = 1, f(3) = 2, ... f(42) = 267914296

meer dan 3 jaar 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)...

meer dan 3 jaar ago

Solved


Iccanobif numbers 1
There are a lot of problems in Cody that deal with Fibonacci numbers (1, 1, 2, 3, 5, 8, 13, 21 etc...) so let's turn things arou...

meer dan 3 jaar 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 + ...

meer dan 3 jaar 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...

meer dan 3 jaar ago

Load more