Solved


Test Problem; Create a 5x5 array containing all ones
This is a test for learning the process of creating a Cody problem. The goal of this test problem will be to create an array,...

8 years ago

Solved


Max of a Vector
Write a function to return the max of a vector

8 years ago

Solved


The sum of the numbers in the vector
eg. [1,2,3]---->SUM=6

8 years ago

Solved


Min of a Matrix
Return the minimum value in the given matrix.

8 years ago

Solved


Area of a circle
Find the value for area of the circle if diameter is given

8 years ago

Solved


Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.

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

8 years ago

Solved


given 3 sides, find area of this triangle
1:3 -> 0; 3:5 -> 6

8 years ago

Solved


Back to basics 1 - Saving
Covering some basic topics I haven't seen elsewhere on Cody. Given an input variable 'x', save it to disk in a file named 'co...

8 years ago

Problem


The great 82-year-old
Let's answer the question below; 'I am *x* years old and I have never written programs. If I study from now, will I be able ...

8 years ago | 3 | 152 solvers

Solved


Three...is a magic number.
Yes it is... It's a magic number... To help you get rid of that earworm, here's a new Cody problem. You are given a squar...

8 years ago

Solved


Time Expansion
How can you slow down any discrete-time signal? Example Input original signal x. x = [1 2 3 -1 -2 -5 -4] We want t...

8 years ago

Solved


Vector push
Append an element |x| to the end of the vector |v| and return both the extended vector and the new number of its elements. |x| c...

8 years ago

Solved


expand intervals
You're given a row vector of an even number of monotonically increasing integers. Each pair of consecutive integers is the lower...

8 years ago

Solved


Detect a number and replace with two NaN's
Write code which replaces the number 1 with two NaNs. Example X = [ 1 2 NaN 4 1 3 7 NaN 1 4 NaN 2] ...

8 years ago

Solved


Rotate a Matrix by 90 degrees
Rotate a Matrix by 90 degrees Example: If the input is: X = 1 2 3 4 5 6 7 8 9 ...

8 years ago

Solved


Sum of the Matrix Elements
Add up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns. E...

8 years ago

Solved


Spherical Volume
Calculate the volume of a sphere.

8 years ago

Solved


Box!
Given a box, find the volume of the cube. With each side = a.

8 years ago

Solved


Do you like your boss?
Do you like your boss? Answer can be any string! For example: Boss = 'Do you like your boss?'; Output = 'yes' or ...

8 years ago

Solved


Reverse a matrix
Its simple. You have to reverse a given matrix.

8 years ago

Solved


Area of a Square
Inside a square is a circle with radius r. What is the area of the square?

8 years ago

Solved


02 - Vector Variables 2
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2b.png>>

8 years ago

Solved


Sum the numbers on the main diagonal
Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

8 years ago

Solved


"mirror" matrix
Create n x 2n "mirror" matrix of this type: Examples For n = 2 m = [ 1 2 2 1 1 2 2 1 ] For n = 3 m = ...

8 years ago

Solved


Tridiagonal
Return an n-by-n matrix that has a, b, c as the subdiagonal, main diagonal, and superdiagonal entries in the matrix. Example ...

8 years ago

Solved


Find the index of n in magic(n)
If input n=5, then magic(n) is 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22...

8 years ago

Solved


Max Change in Consecutive Elements
If an array is given as input then find the index of consecutive elements that represent maximum change. Example: Input ...

8 years ago

Problem


The proportion of NaN in the data
If NaN occupies less than half of the input data, return 1, otherwise return 0. eg. input x = [1 2 NaN ; 4 NaN 6] >>> out...

8 years ago | 1 | 53 solvers

Solved


Another colon problem
This is simple problem based on problems 555, 801, 1118, etc. Create an index vector from two input vectors. Example: ...

8 years ago

Load more